nix-setup/dropfile.script.nix

13 lines
287 B
Nix
Raw Permalink Normal View History

2024-09-30 17:57:30 +02:00
with import <nixpkgs> {};
pkgs.writeShellScriptBin "dropfile" ''
#!/bin/bash
echo dropping files:
for f in $@ ; do
echo "https://data.tudbut.de/$(basename $f)"
done
sleep 2
echo "rm $(for f in $@ ; do basename "$f" ; done)" | sftp -P 23 root@tudbut.de:/var/www/html/
''