Mise à jour de la configuration
Ajout d'une fonction update_zsh_config pour mettre à jour la configuration depuis le dépôt Git.
This commit is contained in:
parent
138084da02
commit
48ad641495
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue