diff --git a/rc/functions.rc b/rc/functions.rc index 27ea8a5..7570878 100644 --- a/rc/functions.rc +++ b/rc/functions.rc @@ -14,15 +14,6 @@ srm() { fi } - -rvpn() { - if echo $1 | grep "/" > /dev/null; then - sudo route add -net $1 gw 192.168.10.1 - else - sudo route add -host $1 gw 192.168.10.1 - fi -} - cp_p() { strace -q -ewrite cp -- "${1}" "${2}" 2>&1 \ | awk '{ @@ -41,23 +32,6 @@ cp_p() { END { print "" }' total_size=$(stat -c '%s' "${1}") count=0 } - -# debian upgrade -# if the first argument is void, proceed local upgrade -# else, send command via ssh -# assume user have sufficient permission for upgrade -# without interaction -# -# Note: -# i use sudo with the follow lines -# -# Cmnd_Alias DEBIAN = /usr/bin/apt-get, /usr/bin/dpkg -# asyd ALL = PASSWD: ALL, NOPASSWD: DEBIAN -upgrade () { - sudo apt-get update - sudo apt-get -u dist-upgrade -- force-yes -y -} - lsperm () { echo $1 | perl -e 'chomp($s=<>);$p=(stat($s))[2] & 07777;printf "$s -> %04o\n",$p' } @@ -131,3 +105,10 @@ utf8 () { fi } +# Update the config +update_zsh_config () { + cd ~/.zsh + echo "Updating ZSH configuration…" + git pull + cd $OLDPWD +} \ No newline at end of file