Skip to content

Commit

Permalink
improve fetch_desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuseteam committed Apr 25, 2024
1 parent a05fdef commit 231d37e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/clickfunc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function build_click () {
function prep_build () {
[ -d "${INSTALL_DIR}" ] && rm -r ${INSTALL_DIR}
mkdir -p ${CLICK_LD_LIBRARY_PATH} ${CLICK_PATH} ${INSTALL_DIR}
fetch_desktop ${PKG} ${INSTALL_DIR};
fetch_desktop ${INSTALL_DIR} ${INSTALL_DIR};
mod_desktop
cp ${ROOT}/pkg.d/* ${ROOT}/apparmor.json ${ROOT}/manifest.json ${BUILD_DIR}/ || exit 1
sed -i "s/@pkg@/${PKG}/" ${BUILD_DIR}/manifest.json
Expand Down
5 changes: 3 additions & 2 deletions lib/pkgfunc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function pkg_install () {
source "${PKG_PREFIX}/lib/crackle/${pkgname}";
install_${pkgname};
fi
fetch_desktop ${pkgname} ${PKG_PREFIX}/share/applications
fetch_desktop ${PKG_PATH}/${pkgname} ${PKG_PREFIX}/share/applications
link_icons;
link_bash-completion;
}
Expand Down Expand Up @@ -110,11 +110,12 @@ function pkgsetup(){
}

function fetch_desktop() {
PKG_DIR=$1
PKG_DESKTOP=$2
while read desktop
do
desktopname=$(basename $desktop)
${SCRP_DIR}/desktop_trunc $desktop > ${PKG_DESKTOP}/crackle.${desktopname}
echo "X-Ubuntu-Touch=true" >> ${PKG_DESKTOP}/crackle.${desktopname}
done < <(find $PKG_PATH/$1 -name *.desktop)
done < <(find $PKG_DIR -name *.desktop)
}

0 comments on commit 231d37e

Please sign in to comment.