X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=OSX%2Finstaller.sh;fp=OSX%2Finstaller.sh;h=05e1b23f36e0e3200a8f4e9f7e6749b8fdf752c4;hp=329a7c18574ae7425563053a7038d005920761a9;hb=d5186197bc394e10a4402f7f6d23fbb14103bc50;hpb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e diff --git a/OSX/installer.sh b/OSX/installer.sh index 329a7c18..05e1b23f 100755 --- a/OSX/installer.sh +++ b/OSX/installer.sh @@ -71,7 +71,8 @@ PU="$DSTVOLUME/$HOME/Library/Screen Savers" # is in the DMG, and we remove the leading dot when installing it. # Without this, auto-updates won't work right. # -UPDATER=".XScreenSaverUpdater.app" +UPDATER_SRC="XScreenSaver.updater" +UPDATER_DST="XScreenSaverUpdater.app" cd "$SRC" || error "The 'Screen Savers' folder does not exist. @@ -94,20 +95,26 @@ mkdir -p "$DST2" || error "Unable to create directory $DST2/" # Install the savers and the updater in /System/Library/Screen Savers/ # Install the other apps in /Applications/ # -for f in *.{saver,app} "$UPDATER" ; do +for f in *.{saver,app} "$UPDATER_SRC" ; do EXT=`echo "$f" | sed 's/^.*\.//'` - if [ "$EXT" = "app" -a "$f" != "$UPDATER" ]; then + if [ "$f" = "$UPDATER_SRC" ]; then + DST="$DST1" + elif [ "$EXT" = "app" ]; then DST="$DST2" else DST="$DST1" fi - f2=`echo "$f" | sed 's/^\.//'` # install ".foo" as "foo" - DD="$DST/$f2" + DD="$DST/$f" echo "Installing $DD" >&2 rm -rf "$DD" || error "Unable to delete $DD" - cp -pR "$f" "$DD/" || error "Unable to install $f in $DST/" + + if [ "$f" = "$UPDATER_SRC" ]; then + ( cd "$DST/" && tar -xzf - ) < "$f" || error "Unable to unpack $f in $DST/" + else + cp -pR "$f" "$DD" || error "Unable to install $f in $DST/" + fi # Eliminate the "this was downloaded from the interweb" warning. xattr -r -d com.apple.quarantine "$DD"