Gen 423: Converted shell scripts into nix files
This commit is contained in:
16
glasshouse-laptop/home/scripts/compress.nix
Normal file
16
glasshouse-laptop/home/scripts/compress.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ pkgs }:
|
||||
|
||||
{
|
||||
compress = pkgs.writeShellScriptBin "compress" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if (( $# == 1 )) then
|
||||
# echo -ne "Archive name: "
|
||||
# read name
|
||||
# tar -cvzf "$name.tar.gz" $1
|
||||
tar -cvzf "$1.tar.gz" $1
|
||||
else
|
||||
echo "Wrong number of arguments..."
|
||||
fi
|
||||
'');
|
||||
}
|
||||
Reference in New Issue
Block a user