add media cp aliases to zsh
This commit is contained in:
parent
720aaf0a93
commit
52b1728e2e
3 changed files with 74 additions and 54 deletions
|
|
@ -1,8 +1,22 @@
|
|||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
calc = "${pkgs.python313}/bin/python -i ${
|
||||
pkgs.writeText "init.py" ''
|
||||
pkgs.writeText "init.py" ''
|
||||
from math import *;
|
||||
# import numpy as np
|
||||
''
|
||||
} ";
|
||||
} ";
|
||||
cp-media = name: media:
|
||||
let
|
||||
s = pkgs.writeScriptBin "cp-${name}" ''
|
||||
echo "copying to library ${media}"
|
||||
echo "calculating hash"
|
||||
find "$1" - type f - print0 | sort - z | xargs - 0 sha1sum | awk '{
|
||||
print $1}' | sha1sum | awk '{print $1}' > "$1.hash"
|
||||
|
||||
rsync -azP "$1" fili:/media/${media}
|
||||
rsync -azP "$1.hash" fili:/media/${media}
|
||||
'';
|
||||
in
|
||||
"${s}/bin/cp-${name}";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue