diff options
Diffstat (limited to 'update-all.in')
-rw-r--r-- | update-all.in | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/update-all.in b/update-all.in index d1cf12b..76261dc 100644 --- a/update-all.in +++ b/update-all.in @@ -1,35 +1,18 @@ #!/bin/bash # update-all version #VERSION# - -declare -A updateCmds -declare -A hasSudo - -updateCmds["arch"]="pacman -Syu;pacdiff" -updateCmds["crux"]="ports -u;prt-get sysup;rejmerge" -updateCmds["debian"]="aptitude update;aptitude safe-upgrade;aptitude dist-upgrade" +# updates all clients defined in #ETCDIR#/update-all.conf via local versions of update-me . #ETCDIR#/update-all.conf -for systemTyp in "${!updateCmds[@]}" +for system in "${systems[@]}" do - eval "system=(\${${systemTyp}Systems[@]})" - for s in "${system[@]}" - do - if [ "$s" == "localhost" ] - then - conCmd="bash -c" - else - conCmd="ssh -t -t $s" - fi - uCmd="${updateCmds["${systemTyp}"]}" - if [ -n "${hasSudo["${s}"]}" ] - then - uCmd="sudo ${uCmd//;/ && sudo }" - else - uCmd="su -c \"${uCmd//;/ && }\"" - fi - uCmd="${uCmd} && echo 'fertig' || echo 'fehlgeschlagen'; read s" - urxvt -e ${conCmd} "hostname; ${uCmd}" & - done + if [ "${system}" == "localhost" ] + then + cmd="" + else + cmd="ssh -t -t ${system}" + fi + cmd="${cmd} update-me" + urxvt -e ${cmd} & done |