diff options
author | Tim Keller <tjkeller.xyz> | 2024-11-17 23:39:40 -0600 |
---|---|---|
committer | Tim Keller <tjkeller.xyz> | 2024-11-17 23:39:40 -0600 |
commit | 08f22ad82edbe30606a8145a01ab18f2f6d71b4b (patch) | |
tree | cce5c45c996d81d131ada2f409a3c6d041b5416e /.old/sinkold | |
parent | 09ada24d4ec23cf24ab136141b354953d1bbc2fa (diff) | |
download | scripts-08f22ad82edbe30606a8145a01ab18f2f6d71b4b.tar.xz scripts-08f22ad82edbe30606a8145a01ab18f2f6d71b4b.zip |
delete .old dir since all is still stored in version control
Diffstat (limited to '.old/sinkold')
-rwxr-xr-x | .old/sinkold | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/.old/sinkold b/.old/sinkold deleted file mode 100755 index 3022963..0000000 --- a/.old/sinkold +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -printusage() { echo "Usage: $0 [<repos> ...] (repos: all,`echo $repos | tr ' ' ','`) [up|down]" && exit; } - -repos="docs patches" - -oper=`echo $@ | sed 's/.* //'` # Get last argument -([ -z $2 ] || ([ "$oper" != "up" ] && [ "$oper" != "down" ])) && printusage - -# rync options -#fix this too -ropts="--archive --partial --progress --recursive --update --verbose" # Equivalent to: -aPrvu --delete -rdest="tjkrsync@tjkeller.xyz:" - -# Colors -BOLD="\033[1m" -NORM="\033[0m" -CYN="\033[0;36m" -RED="\033[0;31m" -GRN="\033[0;32m" - -printsyncmsg() { echo -n "$CYN[Syncing $SYNCNAME...]$NORM\n"; } -printsuccess() { echo -n "$BOLD$GRN[Successfully synced $SYNCNAME]\n"; } -printerror() { echo -n "$BOLD$RED[An error occured while syncing $SYNCNAME]\n"; } - -sync() { - [ $oper = "up" ] && SYNCNAME="$1$2 to $rdest$2" || SYNCNAME="$rdest$2 to $1$2" - printsyncmsg - (if [ $oper = "up" ]; then rsync $ropts $1$2 $rdest; else rsync $ropts --delete $rdest$2 $1; fi) \ - && printsuccess || printerror -} - -# arg1 = options + containing directory path, arg2 = file/directory name -syncdocs() { destdir="" && sync "/home/timmy/docs/" "school"; } -#syncsites() { destdir="" && sync "--exclude=pass /home/timmy/.local/src/" "sites"; } # Excludes password file -syncpatches() { destdir="" && sync "--exclude=.git /home/timmy/.local/src/programs/" "patches"; } # Excludes git files - -for arg in "$@"; do - case $arg in - all) $0 $repos $oper ;; - up|down) oper=$arg ;; - *) # Would like to use something like $repos) here but cant - for repo in $repos; do - [ "$arg" = "$repo" ] && sync$arg && break - done || printusage - ;; - esac -done |