rebranding: skip OSX icon if there is no Resources dir
authorRudolf Polzer <divVerent@alientrap.org>
Wed, 11 Aug 2010 04:41:59 +0000 (06:41 +0200)
committerRudolf Polzer <divVerent@alientrap.org>
Wed, 11 Aug 2010 04:41:59 +0000 (06:41 +0200)
misc/tools/rebrand-darkplaces-engine.sh

index 8403c990087a2268e750b39dda092a30ac038095..8208d4841f01836b1e74cae04fdca92de7d9420d 100755 (executable)
@@ -111,8 +111,9 @@ EOF
                                pkgdir=..
                                ;;
                esac
                                pkgdir=..
                                ;;
                esac
-               cp "$icon_icns" "$pkgdir/Resources/Darkplaces.icns"
-               cat <<EOF >"$pkgdir/Resources/English.lproj/InfoPlist.strings"
+               if [ -d "$pkgdir/Resources" ]; then
+                       cp "$icon_icns" "$pkgdir/Resources/Darkplaces.icns"
+                       cat <<EOF >"$pkgdir/Resources/English.lproj/InfoPlist.strings"
 /* Localized versions of Info.plist keys */
 
 CFBundleName = "$name";
 /* Localized versions of Info.plist keys */
 
 CFBundleName = "$name";
@@ -120,6 +121,7 @@ CFBundleShortVersionString = "$name";
 CFBundleGetInfoString = "Darkplaces by Forest 'LordHavoc' Hale";
 NSHumanReadableCopyright = "Copyright `date +%Y`";
 EOF
 CFBundleGetInfoString = "Darkplaces by Forest 'LordHavoc' Hale";
 NSHumanReadableCopyright = "Copyright `date +%Y`";
 EOF
+               fi
        fi
 
        cat "$t/darkplaces-this.zip" >> "$EXECUTABLE"
        fi
 
        cat "$t/darkplaces-this.zip" >> "$EXECUTABLE"