1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

style(build): go with cd instead of pushd

This commit is contained in:
vit9696 2017-02-04 14:44:06 +03:00 committed by vit9696
parent 07639011da
commit 68b2d5e179

View File

@ -19,13 +19,13 @@ set -eu -o pipefail
QTOX_DIR="$1"
pushd "$2" &> /dev/null
cd "$2"
BUNDLE_PATH="$(pwd)"
popd &>/dev/null
cd -
pushd "$BUNDLE_PATH/../" &> /dev/null
cd "$BUNDLE_PATH/../"
BUILD_DIR="$(pwd)"
popd &>/dev/null
cd -
DMG_DIR="$BUILD_DIR/dmg.tmp"
APP_VER=$(defaults read "$BUNDLE_PATH/Contents/Info.plist" CFBundleVersion)
@ -40,14 +40,13 @@ rm -f "$BUILD_DIR/qTox.dmg"
mkdir "$DMG_DIR"
cp -r "$BUNDLE_PATH" "$DMG_DIR/"
pushd "$DMG_DIR" &> /dev/null
cd "$DMG_DIR"
ln -s /Applications "./Install to Applications"
mkdir .background
cp -f $QTOX_DIR/osx/background-DMG/qTox-DMG-bak.tiff .background/backgroundImage.tiff
cp -f $QTOX_DIR/osx/DS_Store-DMG ./.DS_Store
cp -f $QTOX_DIR/LICENSE ./LICENSE
cp -f $QTOX_DIR/README.md ./README.md
popd &>/dev/null
cd -
hdiutil create -volname "qTox $APP_VER" -srcfolder "$DMG_DIR/" -format UDZO "$BUILD_DIR/qTox.dmg"