diff options
author | davidovski <david@davidovski.xyz> | 2022-01-02 20:20:33 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-01-02 20:20:33 +0000 |
commit | fd2e929e8e97d93d53611d285439b5425f78fa95 (patch) | |
tree | 7ba566086c5a0153667a699fba9ffdfffaf6c710 /xibuild | |
parent | 44416486773fa191f5f35a8207e12bb3ba125ef1 (diff) |
fixed if missing postinstall
Diffstat (limited to 'xibuild')
-rwxr-xr-x | xibuild | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -137,12 +137,14 @@ xibuild () { 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 + if command -v postinstall; then + 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 fi # go back to root, make things easier |