nix-setup/plans.script.nix
2024-10-30 01:16:16 +01:00

13 lines
262 B
Nix

with import <nixpkgs> {};
pkgs.writeShellScriptBin "plans" ''
#!/bin/sh
if [ "$1" = "add" ] ; then
echo "$2" >> ~/sync/plans.txt
fi
if [ "$1" = "done" ] ; then
tail -n"$(($(wc -l < ~/sync/plans.txt) - 1))" ~/sync/plans.txt
fi
cat ~/sync/plans.txt
''