From 48ad641495c455732c421db2d3ee4a257cba387a Mon Sep 17 00:00:00 2001 From: Sasha MOREL Date: Thu, 12 Apr 2018 11:03:47 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20la=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajout d'une fonction update_zsh_config pour mettre à jour la configuration depuis le dépôt Git. --- rc/functions.rc | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) 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