mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Add archive and install-binary script
This commit is contained in:
@@ -41,3 +41,9 @@ release: format_code
|
||||
git add .
|
||||
git commit -m "Update to $(VERSION)"
|
||||
git tag $(VERSION)
|
||||
|
||||
install-binary:
|
||||
./scripts/install.sh
|
||||
|
||||
archive: build
|
||||
./scripts/archive.sh
|
||||
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
TOOL_NAME=XcodeGen
|
||||
TOOL_NAME_LOWER=xcodegen
|
||||
TMP=$(mktemp -d)/$TOOL_NAME
|
||||
BINDIR=$TMP/bin
|
||||
SHAREDIR=$TMP/share
|
||||
ZIPFILE=$TMP/$TOOL_NAME_LOWER.zip
|
||||
INSTALLSH=scripts/install-binary.sh
|
||||
|
||||
mkdir -p $BINDIR
|
||||
cp -f .build/release/$TOOL_NAME_LOWER $BINDIR
|
||||
|
||||
mkdir -p $SHAREDIR
|
||||
cp -R SettingPresets $SHAREDIR/SettingPresets
|
||||
|
||||
sed -e 's/^BASE_DIR=.*/BASE_DIR=$(cd `dirname $0`; pwd)/' -e '/.*[zZ][iI][pP].*/d' $INSTALLSH \
|
||||
> $TMP/install.sh
|
||||
chmod +x $TMP/install.sh
|
||||
|
||||
(cd $TMP/..; zip -r $ZIPFILE $TOOL_NAME)
|
||||
mv $ZIPFILE .
|
||||
|
||||
rm -rf $TMP
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
PREFIX=${1:-/usr/local}
|
||||
|
||||
### NOTE: Stripped or replaced by archive.sh from this line
|
||||
ZIPFILE=xcodegen.zip
|
||||
if [ ! -f $ZIPFILE ];then echo $ZIPFILE not found; exit 1; fi
|
||||
unzip -o xcodegen.zip
|
||||
BASE_DIR=XcodeGen
|
||||
### to this line.
|
||||
|
||||
cp -r $BASE_DIR/share "${PREFIX}"
|
||||
cp -r $BASE_DIR/bin "${PREFIX}"
|
||||
Reference in New Issue
Block a user