summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-01-02 19:38:26 +0000
committerdavidovski <david@davidovski.xyz>2022-01-02 19:38:26 +0000
commit44416486773fa191f5f35a8207e12bb3ba125ef1 (patch)
tree46b891a6c729cf73568c1c5ffee03f36f4ee2fbc
parenta0d18a666de03df45f5690e28bb1c4ecb60e7f11 (diff)
added post install
-rwxr-xr-xxibuild9
1 files changed, 9 insertions, 0 deletions
diff --git a/xibuild b/xibuild
index 0ec0661..fb47d9d 100755
--- a/xibuild
+++ b/xibuild
@@ -132,9 +132,18 @@ xibuild () {
build >> $LOGFILE 2>&1 && printf "$PASS built\n" || return 1;
+
printf "\033[0;34m\tpackaging package...\033[0m";
package >> $LOGFILE 2>&1 && printf "$PASS packaged\n" || return 1;
+ # add postinstall script
+ POSTINSTALL=$(type postinstall | sed '1,3d;$d')
+ if [ ${#POSTINSTALL} != 0 ]; then
+ POST_DIR=$PKG_DEST/tmp/xi/postinstall
+ mkdir -p $POST_DIR
+ echo "#!/bin/sh" > $POST_DIR/$PKG_NAME.sh
+ echo $POSTINSTALL >> $POST_DIR/$PKG_NAME.sh
+ fi
# go back to root, make things easier
cd $XI_ROOT