diff options
author | Victor Engmark <victor@engmark.name> | 2021-11-14 15:54:33 +1300 |
---|---|---|
committer | Victor Engmark <victor@engmark.name> | 2021-11-14 16:04:46 +1300 |
commit | 57b496ea98bdbd633c48f16af1c69a196aaf963a (patch) | |
tree | e12cd5e6735aa44ae5725d8210b933de4a1234aa /pkgs/build-support/fetchmtn | |
parent | 90dbec47b7c8eff5262fda73d97335fb29e079fa (diff) |
misc: Replace tab indentation with spaces
I've tried to be consistent, using four or eight spaces to line up with existing code.
Diffstat (limited to 'pkgs/build-support/fetchmtn')
-rw-r--r-- | pkgs/build-support/fetchmtn/builder.sh | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/pkgs/build-support/fetchmtn/builder.sh b/pkgs/build-support/fetchmtn/builder.sh index c1b0db895bc10..73eff9c272529 100644 --- a/pkgs/build-support/fetchmtn/builder.sh +++ b/pkgs/build-support/fetchmtn/builder.sh @@ -2,33 +2,33 @@ source $stdenv/setup set -x -if ! [ -f "$cacheDB" ]; then - echo "Creating cache DB $cacheDB" - mtn --db "$cacheDB" db init +if ! [ -f "$cacheDB" ]; then + echo "Creating cache DB $cacheDB" + mtn --db "$cacheDB" db init fi header "getting revision $selector"; done=; for source in $dbs; do - if mtn pull --db "$cacheDB" "$source" "${branch}"; then - revision="$(mtn --db "$cacheDB" au toposort $(mtn --db "$cacheDB" au select "$selector") | tail -1)"; - if [ -n "$revision" ]; then - if mtn --db "$cacheDB" au get_revision "$revision"; then - echo "found revision $revision" - done=1; - else - echo "revision $revision does not exist"; - fi - else - echo "selector $selector does not match any revision"; - fi - else - echo "pulling branch $branch wasn't successful"; - fi; - if test -n "$done"; then - break; - fi; + if mtn pull --db "$cacheDB" "$source" "${branch}"; then + revision="$(mtn --db "$cacheDB" au toposort $(mtn --db "$cacheDB" au select "$selector") | tail -1)"; + if [ -n "$revision" ]; then + if mtn --db "$cacheDB" au get_revision "$revision"; then + echo "found revision $revision" + done=1; + else + echo "revision $revision does not exist"; + fi + else + echo "selector $selector does not match any revision"; + fi + else + echo "pulling branch $branch wasn't successful"; + fi; + if test -n "$done"; then + break; + fi; done; stopNest; @@ -36,10 +36,10 @@ stopNest; header "checking out the revision $revision"; if test -n "$done"; then - mtn checkout --db "$cacheDB" -r "$revision" "$out" -b "${branch}" + mtn checkout --db "$cacheDB" -r "$revision" "$out" -b "${branch}" else - echo "Needed revision still not found. Exiting"; - exit 1; + echo "Needed revision still not found. Exiting"; + exit 1; fi; stopNest |