diff --git a/backup.sh b/backup.sh index e391872..8fa2839 100755 --- a/backup.sh +++ b/backup.sh @@ -18,7 +18,11 @@ # I førstnevnte tilfelle må du også registrere boksen i './ssh_config_backup_targets'. -echo "PVV; hjemmelaget backupscript (\$ git commit sha: $(cd /backupz && git rev-parse HEAD) \$)" +if ! command -v git >/dev/null 2>&1; then + echo "PVV; hjemmelaget backupscript (\$ git commit sha: ??? \$)" +else + echo "PVV; hjemmelaget backupscript (\$ git commit sha: $(cd /backupz && git rev-parse HEAD) \$)" +fi echo date