diff --git a/scripts/package.sh b/scripts/package.sh index 6df36ab7c87d982caf833a331b40f99acfb2a986..f6e370542c41a3c9acbed7c1387fc65ab0d860e5 100644 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -46,13 +46,13 @@ build_appimage() { } export_srcarchive() { - if [ "${1}" ]; then + if [[ "${1}" ]]; then $(cd "${PROJDIR}" && git archive --prefix="${PKGNAME}/" --output="${1}" HEAD) fi } transfer_file() { - if [ -f "${1}" ]; then + if [[ -f "${1}" ]]; then filename="$(basename "${1}")" transferlog="${PROJDIR}/transfer.log" echo "Uploading ${filename}" >> "${transferlog}" @@ -61,6 +61,6 @@ transfer_file() { fi } -if [ "${1}" ]; then +if [[ "${1}" = 'ci_'* || "${1}" = 'build_'* ]]; then ${1} fi diff --git a/scripts/prepare.sh b/scripts/prepare.sh index 433a62283b944f22ae037b231d030424bb80b0f3..631b96c9dad8df0a003c9f2b86ac687ab931349e 100644 --- a/scripts/prepare.sh +++ b/scripts/prepare.sh @@ -2,16 +2,16 @@ PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)" -if [ ! -d "${PROJDIR}/lib/qtil" ]; then +if [[ ! -d "${PROJDIR}/lib/qtil" ]]; then git clone https://github.com/akiraohgaki/qtil.git -b release-0.3.0 --single-branch --depth=1 "${PROJDIR}/lib/qtil" fi -if [ ! -d "${PROJDIR}/lib/AppImageUpdate" ]; then +if [[ ! -d "${PROJDIR}/lib/AppImageUpdate" ]]; then git clone https://github.com/AppImage/AppImageUpdate.git -b continuous --single-branch --depth=1 "${PROJDIR}/lib/AppImageUpdate" git -C "${PROJDIR}/lib/AppImageUpdate" submodule update --init --recursive #--depth=1 fi -if [ ! -d "${PROJDIR}/lib/AppImageUpdate-prebuilt" ]; then +if [[ ! -d "${PROJDIR}/lib/AppImageUpdate-prebuilt" ]]; then mkdir "${PROJDIR}/lib/AppImageUpdate-prebuilt" cd "${PROJDIR}/lib/AppImageUpdate-prebuilt" cmake "${PROJDIR}/lib/AppImageUpdate" -DUSE_SYSTEM_CURL=ON -DBUILD_CPR_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo