diff --git a/bin/cp-torrent b/bin/cp-torrent new file mode 100644 index 0000000..069feb6 --- /dev/null +++ b/bin/cp-torrent @@ -0,0 +1,21 @@ +#!/usr/bin/env zsh + +# Copy .torrent files to my server + +local torrentFile="$1" + +if [[ ! (-e $torrentFile) ]] +then + echo "The specified file does not exist" + exit 1 +fi + +if [[ ! ($torrentFile =~ (torrent$)) ]] +then + echo "File specified must be a torrent file" + exit 1 +fi + +# rsync the file over +rsync --remove-source-files --compress --compress-choice=zstd --compress-level=22 $torrentFile jmbhetz:~/.torrents/ + diff --git a/bootstrap.sh b/bootstrap.sh index 321f00c..96bb053 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -48,6 +48,9 @@ ln -s $BASEDIR/neovim $HOME/.config/nvim echo "For compatability we chall copy the global gitconfig" cp $BASEDIR/gitconfig $HOME/.gitconfig +# Copy the progs into the local bin dir +rsync -av --chmod=+x $BASEDIR/bin/ $HOME/.local/bin/ + # Source zshrc echo "And finally, source the .zshrc" source $HOME/.zshrc