Is there a cleaner/easier way to do this?
Thanks!Code:#!/bin/bash updatesFound=0 # ## Some code here to check for updates found remotely # if [ $updatesFound -gt 0 ]; then # the script running is outdated, and needs to be relaunched relaunchCMD="$0" i=1 ARGC=$# while [ $i -le $ARGC ]; do relaunchCMD="$relaunchCMD \"${!i}\"" i=$((i+1)); # increment input done $relaunchCMD --no-update fi
Bookmarks