From c99ca14a05558b11bae20f2ab887e1c42aa921a7 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 4 May 2022 22:31:44 +0100 Subject: created new xibuild --- xi_profile.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 xi_profile.sh (limited to 'xi_profile.sh') 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 -- cgit v1.2.1