cyberlocker-tools: init
This commit is contained in:
parent
1c0af4687c
commit
3c35eca7e8
19
krebs/5pkgs/simple/cyberlocker-tools/default.nix
Normal file
19
krebs/5pkgs/simple/cyberlocker-tools/default.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
pkgs.symlinkJoin {
|
||||||
|
name = "cyberlocker-tools";
|
||||||
|
paths = [
|
||||||
|
(pkgs.writers.writeDashBin "cput" ''
|
||||||
|
set -efu
|
||||||
|
path=$1
|
||||||
|
|
||||||
|
${pkgs.curl}/bin/curl -Ss --data-binary @- "http://c.r/$path"
|
||||||
|
echo "http://c.r/$path"
|
||||||
|
'')
|
||||||
|
(pkgs.writers.writeDashBin "cdel" ''
|
||||||
|
set -efu
|
||||||
|
path=$1
|
||||||
|
|
||||||
|
${pkgs.curl}/bin/curl -X DELETE "http://c.r/$path"
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user