release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change
on this file since b84feab was
2f2a643,
checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
|
locker-update: Add --beta and --dry-run options.
|
-
Property mode set to
100755
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | beta= |
---|
3 | dryrun= |
---|
4 | |
---|
5 | usage() { |
---|
6 | echo "Usage: $0 [--dry-run|-n] [--beta|-b] NEW-VERSION" >&2 |
---|
7 | exit 1; |
---|
8 | } |
---|
9 | |
---|
10 | for arg in "$@"; do |
---|
11 | case $arg in |
---|
12 | --beta|-b) |
---|
13 | beta=1 ;; |
---|
14 | --dry-run|-n) |
---|
15 | dryrun=1 ;; |
---|
16 | -*) |
---|
17 | usage ;; |
---|
18 | *) |
---|
19 | test -n "$NEWVERSION" && usage |
---|
20 | NEWVERSION="$arg" |
---|
21 | ;; |
---|
22 | esac |
---|
23 | done |
---|
24 | |
---|
25 | test -z "$NEWVERSION" && usage |
---|
26 | |
---|
27 | # Run this as 'locker-update NEW-VERSION' to upgrade the barnowl.real |
---|
28 | # symlink in all arch/ directories to point to the new version. |
---|
29 | |
---|
30 | E= |
---|
31 | test -n "$dryrun" && E=echo |
---|
32 | |
---|
33 | cd /mit/barnowl/arch/ |
---|
34 | |
---|
35 | for i in *; do |
---|
36 | if [ -L "$i" ]; then |
---|
37 | echo "# Skipping $i as a symbolic link..." |
---|
38 | elif [ "$i" = "common" ]; then |
---|
39 | echo "# Skipping 'common'..." |
---|
40 | elif ! [ -e "$i/bin/$NEWVERSION" ]; then |
---|
41 | echo "# New version $NEWVERSION not built for arch $i..."; |
---|
42 | else |
---|
43 | echo "# $i" |
---|
44 | if test -n "$beta"; then |
---|
45 | $E ln -sf "../../common/bin/barnowl-beta" "$i/bin/barnowl-beta" |
---|
46 | $E ln -sf "$NEWVERSION" "$i/bin/barnowl.real-beta" |
---|
47 | else |
---|
48 | # Sanity -- make sure the 'barnowl' symlink is correct. |
---|
49 | $E ln -sf "../../common/bin/barnowl" "$i/bin/barnowl" |
---|
50 | $E ln -sf "$NEWVERSION" "$i/bin/barnowl.real" |
---|
51 | fi |
---|
52 | fi |
---|
53 | done; |
---|
Note: See
TracBrowser
for help on using the repository browser.