From 906dc0ededa03d433c76997c72ed0ed90af2b93f Mon Sep 17 00:00:00 2001 From: Rahammetoela Toekiman Date: Thu, 8 Aug 2024 12:42:50 +0000 Subject: [PATCH] Fix ci --- crackle | 10 ++++++---- lib/clickfunc | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/crackle b/crackle index 8d99c18..d514a71 100755 --- a/crackle +++ b/crackle @@ -24,9 +24,9 @@ SCRP_DIR=$(dirname "${BASH_SOURCE[0]}") SUDO_CONFIG=/root/.config SUDO_BIN=/root/.local/bin SUDO_STATE=/root/.local/state - +set -x # invalidate cached credentials to ensure sudo asks for the password the first time it is used by crackle -sudo -k +if [[ -z "$CI" ]]; then sudo -k; fi # check if the files differ, if yes overwrite the old version upd() { @@ -216,8 +216,10 @@ APT_CACHE="apt-cache -o Dir::Cache=$APTCACHE -o Dir::State=$APTSTATE -o Dir::Etc say "checking connectivity" wget -q --spider https://ubports.com || err "no internet connection, please run crackle update later to fetch the latest package lists"; - if check_cmd curl; then say "Updating Cracklebin"; fi - if check_cmd curl; then curl --disable --progress-bar -L ${CRACKLEBIN} | tar zx --strip-components=1 -C $PKG_PREFIX/lib/crackle; fi + if [[ -z "$CI" ]]; then + if check_cmd curl; then say "Updating Cracklebin"; fi + if check_cmd curl; then curl --disable --progress-bar -L ${CRACKLEBIN} | tar zx --strip-components=1 -C $PKG_PREFIX/lib/crackle; fi + fi if check_cmd curl; then say "Updating repos"; fi if check_cmd curl; then curl --disable --progress-bar -L ${CRACKLEBIN} | tar zx --directory=$APTCONFIG/preferences.d --wildcards */etc/preferences.d/* --strip-components=3; fi diff --git a/lib/clickfunc b/lib/clickfunc index 85ce7d8..9178aaf 100644 --- a/lib/clickfunc +++ b/lib/clickfunc @@ -50,7 +50,7 @@ function prep_build () { } mod_desktop(){ - desktopfile=$(find ${INSTALL_DIR} -maxdepth 1 -name *.desktop) + desktopfile=$(find ${INSTALL_DIR} -maxdepth 1 -name *${PKG}*.desktop) sed -i "/Icon=/d" $desktopfile sed -i "/Exec=/d" $desktopfile sed -i "/^Categories=/i Exec=${PKG}.sh" $desktopfile;