Changeset 1050
- Timestamp:
- Apr 3, 2009, 12:51:32 AM (16 years ago)
- Location:
- locker
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
locker/doc/autoinstallers
r1029 r1050 51 51 # --dev here means to put the update in /mit/scripts/deploydev/updates 52 52 /mit/scripts/sbin/build-update --dev $PKG $OLDVERS $NEWVERS 53 # Test the update by running cd /mit/foo/web_scripts/bar && /mit/scripts/deploydev/updates/$PKG-#OLDVERS-to-$NEWVERS/update 53 # Test the update by running cd /mit/foo/web_scripts/bar && /mit/scripts/deploydev/updates/$PKG-#OLDVERS-to-$NEWVERS/update "foo" 54 54 55 55 # If necessary, repeat this process. You can edit the files in the -
locker/sbin/build-update
r746 r1050 97 97 set -e -o noclobber 98 98 99 die () { echo "$1" >&2; rm .scripts-security-upd-lock; exit 1; } 99 die () { echo "[$PWD] die: $1" >&2; rm .scripts-security-upd-lock; exit 1; } 100 aiee () { echo "[$PWD] AIEE: $1" >&2; exit 2; } 100 101 101 102 patchdir=$(dirname "$0") 103 lockername="$1${1:-$USER}" 102 104 103 105 >.scripts-security-upd-lock || die "error: Unable to obtain update lock." … … 130 132 echo "[$PWD] dry run OK, applying update" 131 133 132 mv .scripts-version .scripts-version.old 133 patch -stN --no-backup-if-mismatch -p2 <"$patchdir/update.diff" || :134 xargs rm -f <"$patchdir/files.delete" 135 tar -xzf "$patchdir/newfiles.tar.gz" 134 mv .scripts-version .scripts-version.old || aiee "Failed to back up scripts-version" 135 patch -stN --no-backup-if-mismatch -p2 <"$patchdir/update.diff" || aiee "patch did not apply" 136 xargs rm -f <"$patchdir/files.delete" || aiee "Failed to remove files" 137 tar -xzf "$patchdir/newfiles.tar.gz" || aiee "Failed to extract new files" 136 138 [ -e "$patchdir/extra/postpatch.sh" ] && . "$patchdir/extra/postpatch.sh" 137 139 ( … … 143 145 echo "$newpackages" 144 146 ) >.scripts-version 145 rm -f .scripts-version.old 147 rm -f .scripts-version.old || aiee "Failed to remove .scripts-version.old" 146 148 147 rm -f .scripts-security-upd-lock 149 rm -f .scripts-security-upd-lock || aiee "Failed to remove .scripts-security-upd-lock" 148 150 149 151 echo "[$PWD] done"
Note: See TracChangeset
for help on using the changeset viewer.