Skip to content

Commit

Permalink
make the icon and desktop func more package specific
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuseteam committed Apr 15, 2024
1 parent 6565ba6 commit f77f2bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 4 additions & 0 deletions lib/linkfunc
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ function link_bash-completion(){
[ -d "$PKGS_DIR/etc/bash_completion.d" ] && ln -s "$PKGS_DIR"/etc/bash_completion.d/* ${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions 2> /dev/null;
[ -d "$PKGS_DIR/usr/share/bash-completion/completions" ] && ln -s "$PKGS_DIR"/usr/share/bash-completion/completions/* ${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions 2> /dev/null;
}

function link_icons() {
if [[ -d "${PKG_PATH}/${pkgname}/usr/share/icons" ]]; then say "linking icons directory";ln -s ${PKG_PATH}/${pkgname}/usr/share/icons ${PKG_PREFIX}/share;fi
}
8 changes: 2 additions & 6 deletions lib/pkgfunc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ function pkg_install () {
source "${PKG_PREFIX}/lib/crackle/${pkgname}";
install_${pkgname};
fi
fetch_desktop ${PKGS_DIR}/usr/share/applications/${pkgname}.desktop ${PKG_PREFIX}/share/applications/crackle.${pkgname}.desktop
if [[ ! -e "${PKGS_DIR}/share/icons" ]]; then link_iconsdir; fi
fetch_desktop ${PKG_PATH}/${pkgname}/usr/share/applications/${pkgname}.desktop ${PKG_PREFIX}/share/applications/crackle.${pkgname}.desktop
if [[ ! -e "${PKG_PATH}/${pkgname}/usr/share/icons" ]]; then link_icons; fi
link_bash-completion;
}

Expand Down Expand Up @@ -87,7 +87,3 @@ function fetch_desktop() {
echo "X-Ubuntu-Touch=true" >> $2
fi
}

function link_iconsdir() {
if [[ -d "${PKG_PATH}/usr/share/icons" ]]; then say "linking icons directory";ln -s ${PKG_PATH}/usr/share/icons ${PKG_PREFIX}/share;fi
}

0 comments on commit f77f2bc

Please sign in to comment.