Add new script and it's dependencies.

This commit is contained in:
CronyAkatsuki 2024-03-30 17:29:13 +01:00
parent 720b7618a0
commit c2a8221c7f
2 changed files with 17 additions and 0 deletions

View File

@ -26,5 +26,9 @@ stdenv.mkDerivation {
# Add dependencies to the runtime for my iso2chd script
wrapProgram $out/bin/iso2chd \
--prefix PATH : ${lib.makeBinPath [ mame-tools ]}
# Add dependencies to the runtime for my sync-backup script
wrapProgram $out/bin/sync-backup \
--prefix PATH : ${lib.makeBinPath [ rsync cryptsetup ]}
'';
}

View File

@ -0,0 +1,13 @@
#!/usr/bin/env sh
disk="$1"
sudo cryptsetup luksOpen "$disk" crypt
sudo mount /dev/mapper/crypt "$HOME/Documents/drive"
rsync -ahAXv --delete /home/crony/.local/backup/ /home/crony/Documents/drive/backup
sudo umount "$HOME/Documents/drive"
sudo cryptsetup luksClose /dev/mapper/crypt