diff options
-rwxr-xr-x | all-update.sh | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/all-update.sh b/all-update.sh index 7c326c1..9f5993d 100755 --- a/all-update.sh +++ b/all-update.sh @@ -15,8 +15,6 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -set -e - usage() { echo "Usage: all-update your-system" echo @@ -33,10 +31,10 @@ fi workspace="$PWD"/../.. system="$1" - strata=`grep "morph.*: *" "$system.morph" | cut -d: -f2-` -for stratum in $strata; do +if [ -z "$2" ]; then + for stratum in $strata; do chunks=`grep "name.*: *" "$stratum.morph" | cut -d: -f2-` for chunk in $chunks; do if [ "$chunk" != "$stratum" ]; then @@ -44,8 +42,8 @@ for stratum in $strata; do morph edit $system $stratum $chunk 1>&2 fi done -done - + done +fi repos=`for stratum in $strata; do grep "repo.*: *" "$stratum.morph" | cut -d: -f3- @@ -55,7 +53,7 @@ for repo in $repos; do cd $workspace/*:$repo startpoint=`git rev-parse HEAD` echo merging master into $repo - git merge $master + git merge master if [ $? != "0" ]; then git reset --hard $startpoint echo merge failed for $repo |