diff options
author | davidovski <david@davidovski.xyz> | 2022-05-04 22:31:44 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-05-04 22:31:44 +0100 |
commit | c99ca14a05558b11bae20f2ab887e1c42aa921a7 (patch) | |
tree | fc3bd87732317a5e05aca55d5bd2ab6bf19a4a3d /xi_profile.sh | |
parent | f36a24225ac6935ec59d65e377946cbc26b960f5 (diff) |
created new xibuild
Diffstat (limited to 'xi_profile.sh')
-rw-r--r-- | xi_profile.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/xi_profile.sh b/xi_profile.sh new file mode 100644 index 0000000..d88ed80 --- /dev/null +++ b/xi_profile.sh @@ -0,0 +1,48 @@ +#!/bin/sh +cd $1 + +prepare () { + echo "passing prepare" +} + +build () { + echo "passing build" +} + +check () { + echo "passing check" +} + +package () { + echo "passing package" +} + +for xibuild in *.xibuild; do + PKG_NAME=$(basename $xibuild .xibuild) + export PKG_DEST=./xipkg/$PKG_NAME + mkdir -p $PKG_DEST + + . ./$xibuild + + echo "==========================PREPARE STAGE==========================" + prepare || exit 1 + echo "==========================BUILD STAGE==========================" + build || exit 1 + echo "==========================CHECK STAGE==========================" + check || exit 1 + echo "==========================PACKAGE STAGE==========================" + package || exit 1 + + printf "checking for postinstall... " + if command -v postinstall > /dev/null; then + echo "adding postinstall" + POST_DIR=$PKG_DEST/var/lib/xipkg/postinstall + mkdir -p $POST_DIR + cat /build/$PKG_NAME.xibuild > $POST_DIR/$PKG_NAME.sh + echo "" >> $POST_DIR/$PKG_NAME.sh + echo "postinstall" >> $POST_DIR/$PKG_NAME.sh + else + echo "no postinstall" + fi + +done |