How can I update several installations at the same time via ssh?
For example one grav-installation in folder A, a second grav-installation in folder B.
“bin/gpm update” is only working within a folder.
Got help and found a solution.
Upload a Script (for example update_grav.sh) with the following content:
----```
#!/bin/bash
logfile="/path/to/log/up_grav_$(date +%Y%m%d)1.log"
j=0
Setups[j++]="/path/to/installation/grav_installation1"
Setups[j++]="/path/to/installation/grav_installation2"
Setups[j++]="/path/to/installation/grav_installation3"
#Add more grav setups as above
echo "### $(date +%Y%m%d_%T) starting update of grav installations " 2>&1 | tee -a ${logfile}
for i in "${Setups[@]}"
do
echo “### $(date +%Y%m%d_%T) update directory $i” | tee -a ${logfile} 2>&1
cd "$i"
bin/gpm selfupgrade -y 2>&1 | tee -a ${logfile}
bin/gpm update -y 2>&1 | tee -a ${logfile}
done
echo "### $(date +%Y%m%d_%T) finished update of grav installations " 2>&1 | tee -a ${logfile}
----```
Than, start your script with “sh update_grav.sh” and relax.