Include port in tscp alias

This commit is contained in:
Sage Vaillancourt 2024-10-10 16:27:58 -04:00
parent e608cda593
commit 823b081b69
1 changed files with 8 additions and 8 deletions

View File

@ -118,7 +118,7 @@ function dconf-dump {
dconf dump / > "$HOME/.dconf-dump.tmp"
}
alias tscp="scp -o ConnectTimeout=8"
alias tscp="scp -o ConnectTimeout=8 -P 11275"
function push-dconf {
if ! command -v dconf &> /dev/null; then
@ -130,7 +130,7 @@ function push-dconf {
return 1
fi
dconf-dump > $HOME/.tmp/dconf-dump || return 1
tscp -P 11275 $HOME/.tmp/dconf-dump 'sage@sagev.space:~/dconf-dump'
tscp $HOME/.tmp/dconf-dump 'sage@sagev.space:~/dconf-dump'
}
function push-extensions {
@ -144,7 +144,7 @@ function push-extensions {
if [[ "$1" != "--force" ]] && diff "$HOME/.tmp/gnome-extension-list" "$HOME/.tmp/prev-gnome-extension-list" &> /dev/null; then
return
fi
tscp -P 11275 "$HOME/.tmp/gnome-extension-list" 'sage@sagev.space:~/gnome-extension-list'
tscp "$HOME/.tmp/gnome-extension-list" 'sage@sagev.space:~/gnome-extension-list'
}
function merge-hist {
@ -158,9 +158,9 @@ function sync-history {
local merged="$HOME/.tmp/$(whoami).histfile"
echo "Downloading shared history..."
if ! tscp -P 11275 "$remote_file" "$copy_of_remote"; then
if ! tscp "$remote_file" "$copy_of_remote"; then
echo "Shared history download failed!"
tscp -P 11275 "$local_history" "$remote_file"
tscp "$local_history" "$remote_file"
return
fi
echo "Merging history files..."
@ -173,7 +173,7 @@ function sync-history {
mv "$merged" "$local_history"
fc -R # Read from new history file
echo "Uploading new shared history..."
tscp -P 11275 "$local_history" "$remote_file"
tscp "$local_history" "$remote_file"
}
function install-extension {
@ -195,7 +195,7 @@ function load-extensions {
echo "gnome-extensions is not installed!"
return
fi
tscp -P 11275 'sage@sagev.space:~/gnome-extension-list' $HOME/.tmp/gnome-extension-list
tscp 'sage@sagev.space:~/gnome-extension-list' $HOME/.tmp/gnome-extension-list
touch "$HOME/.unavailable-extensions"
local existing="$(cat <(gnome-extensions list) "$HOME/.unavailable-extensions")"
for ext in $(cat $HOME/.tmp/gnome-extension-list); do
@ -289,7 +289,7 @@ function sync-dconf {
return
fi
rm $HOME/.tmp/dconf-dump &> /dev/null
tscp -P 11275 'sage@sagev.space:~/dconf-dump' $HOME/.tmp/dconf-dump-inbound
tscp 'sage@sagev.space:~/dconf-dump' $HOME/.tmp/dconf-dump-inbound
dconf-clean $HOME/.tmp/dconf-dump-inbound > $HOME/.tmp/dconf-dump
dconf-dump > $HOME/.tmp/current-dconf-dump
if ! git --no-pager diff --no-index $HOME/.tmp/current-dconf-dump $HOME/.tmp/dconf-dump &> /dev/null; then