diff --git a/Makefile b/Makefile index 15fc615..cf3a77a 100644 --- a/Makefile +++ b/Makefile @@ -12,11 +12,11 @@ install: install -Dm 755 "src/script/${pkgname}.sh" "${DESTDIR}${PREFIX}/bin/${pkgname}" # Install icons - install -Dm 666 "src/icons/${pkgname}.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}.svg" - install -Dm 666 "src/icons/${pkgname}_checking.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_checking.svg" - install -Dm 666 "src/icons/${pkgname}_installing.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_installing.svg" - install -Dm 666 "src/icons/${pkgname}_up-to-date.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_up-to-date.svg" - install -Dm 666 "src/icons/${pkgname}_updates-available.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_updates-available.svg" + install -Dm 666 "src/icons/${pkgname}.svg" "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${pkgname}.svg" + install -Dm 666 "src/icons/${pkgname}_checking.svg" "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${pkgname}_checking.svg" + install -Dm 666 "src/icons/${pkgname}_installing.svg" "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${pkgname}_installing.svg" + install -Dm 666 "src/icons/${pkgname}_up-to-date.svg" "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${pkgname}_up-to-date.svg" + install -Dm 666 "src/icons/${pkgname}_updates-available.svg" "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${pkgname}_updates-available.svg" # Install the .desktop file install -Dm 644 "res/desktop/${pkgname}.desktop" "${DESTDIR}${PREFIX}/share/applications/${pkgname}.desktop" @@ -24,7 +24,7 @@ install: # Install systemd units install -Dm 644 "res/systemd/${pkgname}.service" "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}.service" install -Dm 644 "res/systemd/${pkgname}.timer" "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}.timer" - + # Generate and install .mo files for translations # .mo files are installed as "Arch-Update.mo" to avoid conflicting with the "arch-update.mo" files shipped by the arch-update Gnome extension (https://extensions.gnome.org/extension/1010/archlinux-updates-indicator/) msgfmt po/fr.po -o po/fr.mo @@ -82,7 +82,7 @@ uninstall: rm -f "${DESTDIR}${PREFIX}/share/man/man5/${pkgname}.conf.5.gz" rm -f "${DESTDIR}${PREFIX}/share/man/fr/man1/${pkgname}.1.gz" rm -f "${DESTDIR}${PREFIX}/share/man/fr/man5/${pkgname}.conf.5.gz" - + # Delete documentation and examples rm -rf "${DESTDIR}${PREFIX}/share/doc/${pkgname}/" diff --git a/README-fr.md b/README-fr.md index 0f66d87..f4481bd 100644 --- a/README-fr.md +++ b/README-fr.md @@ -41,7 +41,7 @@ Installez le paquet AUR [arch-update](https://aur.archlinux.org/packages/arch-up Installer les dépendances : ```bash -sudo pacman -S --needed pacman-contrib curl htmlq diffutils +sudo pacman -S --needed pacman-contrib curl htmlq diffutils hicolor-icon-theme ``` Téléchargez l'archive de la [dernière version stable](https://github.com/Antiz96/arch-update/releases/latest) et extrayez-la *(vous pouvez également cloner ce référentiel via `git`)*. diff --git a/README.md b/README.md index 613d86b..454078e 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Install the [arch-update](https://aur.archlinux.org/packages/arch-update "arch-u Install dependencies: ```bash -sudo pacman -S --needed pacman-contrib curl htmlq diffutils +sudo pacman -S --needed pacman-contrib curl htmlq diffutils hicolor-icon-theme ``` Download the archive of the [latest stable release](https://github.com/Antiz96/arch-update/releases/latest) and extract it *(alternatively, you can clone this repository via `git`)*. diff --git a/res/desktop/arch-update.desktop b/res/desktop/arch-update.desktop index 5bc4d13..0139c5a 100644 --- a/res/desktop/arch-update.desktop +++ b/res/desktop/arch-update.desktop @@ -2,5 +2,5 @@ Type=Application Terminal=true Name=Arch-Update -Icon=/usr/share/icons/arch-update/arch-update.svg +Icon=arch-update Exec=arch-update diff --git a/src/script/arch-update.sh b/src/script/arch-update.sh index bae77b8..28031d1 100755 --- a/src/script/arch-update.sh +++ b/src/script/arch-update.sh @@ -190,8 +190,7 @@ invalid_option() { } # Definition of the icon directory -icon_dir="/usr/share/icons/${name}" -[ -d "/usr/local/share/icons/${name}" ] && icon_dir="/usr/local/share/icons/${name}" +icon_dir="/usr/share/icons/hicolor/scalable/apps" # Definition of the icon_checking function: Change icon to "checking" icon_checking() { @@ -226,7 +225,7 @@ check() { else update_available=$(checkupdates) fi - + if [ -n "${notif}" ]; then echo "${update_available}" > "${statedir}/current_updates_check" sed -i '/^\s*$/d' "${statedir}/current_updates_check" @@ -268,7 +267,7 @@ check() { list_packages() { icon_checking info_msg "$(eval_gettext "Looking for updates...\n")" - + if [ -z "${no_version}" ]; then packages=$(checkupdates "${contrib_color_opt[@]}") else @@ -313,7 +312,7 @@ list_packages() { icon_updates_available if [ -z "${list_option}" ]; then ask_msg "$(eval_gettext "Proceed with update? [Y/n]")" - + case "${answer}" in "$(eval_gettext "Y")"|"$(eval_gettext "y")"|"") proceed_with_update="y" @@ -331,11 +330,11 @@ list_packages() { list_news() { if [ -z "${show_news}" ]; then curl -Ls https://www.archlinux.org/news | htmlq -a title a | grep ^"View:" | sed "s/View:\ //g" | head -1 > "${statedir}/current_news_check" - + if ! diff "${statedir}/current_news_check" "${statedir}/last_news_check" &> /dev/null; then show_news="y" fi - + if [ -f "${statedir}/current_news_check" ]; then mv -f "${statedir}/current_news_check" "${statedir}/last_news_check" fi @@ -406,7 +405,7 @@ update() { exit 5 fi fi - + if [ -n "${aur_packages}" ]; then echo main_msg "$(eval_gettext "Updating AUR Packages...\n")" @@ -457,7 +456,7 @@ orphan_packages() { "$(eval_gettext "Y")"|"$(eval_gettext "y")") echo main_msg "$(eval_gettext "Removing Orphan Packages...\n")" - + if ! pacman -Qtdq | "${su_cmd}" pacman --color "${pacman_color_opt}" -Rns -; then echo error_msg "$(eval_gettext "An error has occurred during the removal process\nThe removal has been aborted\n")" @@ -527,7 +526,7 @@ packages_cache() { main_msg "$(eval_gettext "Cached Packages:\nThere are old and/or uninstalled cached packages\n")" ask_msg "$(eval_gettext "Would you like to remove them from the cache now? [Y/n]")" fi - + case "${answer}" in "$(eval_gettext "Y")"|"$(eval_gettext "y")"|"") if [ "${pacman_cache_old}" -gt 0 ] && [ "${pacman_cache_uninstalled}" -eq 0 ]; then @@ -584,7 +583,7 @@ packages_cache() { # Definition of the pacnew_files function: Display pacnew files and offer to process them if there are pacnew_files() { pacnew_files=$(pacdiff -o) - + if [ -n "${pacnew_files}" ]; then main_msg "$(eval_gettext "Pacnew Files:")" echo -e "${pacnew_files}\n"