diff options
Diffstat (limited to 'accounts/gkleen@sif/zshrc')
-rw-r--r-- | accounts/gkleen@sif/zshrc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index c65e35f9..fd1f1002 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc | |||
@@ -1,9 +1,20 @@ | |||
1 | filebin() { | 1 | filebin() { |
2 | basePath=/srv/www/files | 2 | basePath=/srv/www/files |
3 | ssh ymir find "${basePath}" -type f -print0 \ | 3 | ssh ymir find /srv/www/files -type f -printf "$'%T@ %TY-%Tm-%TdT%TH:%TM %P\\\\0'" | sort -zn | cut -z -d ' ' -f 2- \ |
4 | | while IFS= read -r -d $'\0' p; do | 4 | | while IFS= read -r -d $'\0' l; do |
5 | printf "https://f.141.li/%s\n" "${p#${basePath}/}" | 5 | IFS=' ' read -r t p <<<"${l}" |
6 | printf "%s https://f.141.li/%s\n" "${t}" "${p}" | ||
7 | done | ||
8 | } | ||
9 | |||
10 | push2bin() { | ||
11 | if [[ ${#@} -eq 1 && ! -r ${1} ]]; then | ||
12 | uux -p 'ymir!push2bin' $(echo -n "${1:t}" | tr -c $'[:alnum:]+-=.' '_') | ||
13 | else | ||
14 | for f (${@}); do | ||
15 | uux -p 'ymir!push2bin' $(echo -n "${f:t}" | tr -c $'[:alnum:]+-=.' '_') <${f} | ||
6 | done | 16 | done |
17 | fi | ||
7 | } | 18 | } |
8 | 19 | ||
9 | genmail() { | 20 | genmail() { |