Navigation Menu

Skip to content

Commit

Permalink
OS-1729 configure does not handle comments in configure-branches
Browse files Browse the repository at this point in the history
  • Loading branch information
rmustacc committed Nov 28, 2012
1 parent 726e0db commit 942fddb
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions configure
Expand Up @@ -26,6 +26,13 @@ conf_root=$PWD
conf_ips=
conf_priv="pfexec"

function warn
{
local msg="$*"
[[ -z "$msg" ]] && msg="failed"
echo "$conf_arg0: $msg" >&2
}

function fatal
{
local msg="$*"
Expand Down Expand Up @@ -279,6 +286,12 @@ function update_branches
[[ ! -f "configure-branches" ]] && return

while read line; do
line=$(echo $line | sed -e 's/#.*$//')
[[ $? -eq 0 ]] || fatal \
"failed to remove comments in configure-branches"

[[ -z "$line" ]] && continue

repo=${line%%:*}
branch=${line##*:}

Expand All @@ -290,9 +303,12 @@ function update_branches
#
# Handle the legacy name of smartos-live
#
[[ "$repo" == "smartos-live" || \
"$repo" == "illumos-live" ]] && fatal \
"configure-branches cannot be used to update smartos-live"
if [[ "$repo" == "smartos-live" || \
"$repo" == "illumos-live" ]]; then
warn "configure-branches can't update smartos-live"
warn "ignoring and continuing on..."
continue
fi
if [[ "$repo" == "illumos-joyent" || \
"$repo" == "illumos" ]]; then
update_git "projects/illumos" $branch && continue
Expand Down

0 comments on commit 942fddb

Please sign in to comment.