mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 18:03:37 +08:00
make_pkg: Run through shellcheck
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
9fe7efb82f
commit
72bf267d96
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
# Script to produce an OS X installer .pkg and .app(.zip)
|
# Script to produce an OS X installer .pkg and .app(.zip)
|
||||||
|
|
||||||
VERSION=`git describe --always --dirty 2>/dev/null`
|
VERSION=$(git describe --always --dirty 2>/dev/null)
|
||||||
if test -z "$VERSION" ; then
|
if test -z "$VERSION" ; then
|
||||||
echo "Could not get version from git"
|
echo "Could not get version from git"
|
||||||
if test -f version; then
|
if test -f version; then
|
||||||
VERSION=`cat version`
|
VERSION=$(cat version)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -17,19 +17,19 @@ set -x
|
||||||
#Exit on error
|
#Exit on error
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PKGDIR=`mktemp -d`
|
PKGDIR=$(mktemp -d)
|
||||||
|
|
||||||
SRC_DIR=$PWD
|
SRC_DIR=$PWD
|
||||||
OUTPUT_PATH=${FISH_ARTEFACT_PATH:-~/fish_built}
|
OUTPUT_PATH=${FISH_ARTEFACT_PATH:-~/fish_built}
|
||||||
|
|
||||||
mkdir -p $PKGDIR/build $PKGDIR/root $PKGDIR/intermediates $PKGDIR/dst
|
mkdir -p "$PKGDIR/build" "$PKGDIR/root" "$PKGDIR/intermediates" "$PKGDIR/dst"
|
||||||
( cd "$PKGDIR/build" && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo "$SRC_DIR" && make -j 4 && env DESTDIR=$PKGDIR/root/ make install )
|
{ cd "$PKGDIR/build" && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo "$SRC_DIR" && make -j 4 && env DESTDIR="$PKGDIR/root/" make install; }
|
||||||
pkgbuild --scripts build_tools/osx_package_scripts --root $PKGDIR/root/ --identifier 'com.ridiculousfish.fish-shell-pkg' --version "$VERSION" $PKGDIR/intermediates/fish.pkg
|
pkgbuild --scripts build_tools/osx_package_scripts --root "$PKGDIR/root/" --identifier 'com.ridiculousfish.fish-shell-pkg' --version "$VERSION" "$PKGDIR/intermediates/fish.pkg"
|
||||||
|
|
||||||
productbuild --package-path $PKGDIR/intermediates --distribution build_tools/osx_distribution.xml --resources build_tools/osx_package_resources/ $OUTPUT_PATH/fish-$VERSION.pkg
|
productbuild --package-path "$PKGDIR/intermediates" --distribution build_tools/osx_distribution.xml --resources build_tools/osx_package_resources/ "$OUTPUT_PATH/fish-$VERSION.pkg"
|
||||||
|
|
||||||
|
|
||||||
# Make the app
|
# Make the app
|
||||||
( cd "$PKGDIR/build" && make fish_macapp && zip -r "$OUTPUT_PATH/fish-$VERSION.app.zip" fish.app )
|
{ cd "$PKGDIR/build" && make fish_macapp && zip -r "$OUTPUT_PATH/fish-$VERSION.app.zip" fish.app; }
|
||||||
|
|
||||||
rm -r $PKGDIR
|
rm -r "$PKGDIR"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user