install: add fixed resolution png icons for use on desktops (#1280)

* Create icon subdirectory and move scalable icon

* Add fixed size png application icons

* Modify install script to install icons to correct locations

* Fix typo in for loop

* Fix indentation

* Further corrected indentation.

* Formatting and code cleanups

* Formatting fixes

I actually don't know what I did.
But shfmt is no longer complaining.
This commit is contained in:
sfalken
2024-03-13 08:59:06 +01:00
committed by GitHub
parent 19137702fa
commit 4176c4bb67
13 changed files with 14 additions and 6 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

+14 -6
View File
@@ -77,7 +77,7 @@ if [ -z "${prefix}" ]; then
fi
dest_path="${prefix}/bin"
man_dest_path="${prefix}/share/man/man1"
icon_dest_path="${prefix}/share/icons"
icon_dest_path="${prefix}/share/icons/hicolor"
completion_bash_dest_path="${prefix}/share/bash-completion/completions/"
completion_zsh_dest_path="${prefix}/share/zsh/site-functions/"
@@ -116,8 +116,12 @@ if [ -e "${curr_dir}/distrobox-enter" ]; then
install -D -m 0644 -t "${completion_zsh_dest_path}" "${file}"
done
fi
if [ -e terminal-distrobox-icon.svg ]; then
install -D -m 0644 -t "${icon_dest_path}" terminal-distrobox-icon.svg
if [ -e icons/terminal-distrobox-icon.svg ]; then
install -D -m 0644 -t "${icon_dest_path}/scalable/apps" icons/terminal-distrobox-icon.svg
for sz in 16 22 24 32 36 48 64 72 96 128 256; do
install -D -m 0644 -t "${icon_dest_path}/${sz}x${sz}/apps" \
icons/hicolor/"${sz}x${sz}"/apps/terminal-distrobox-icon.png
done
fi
else
printf >&2 "\033[1;31m Checking dependencies...\n\033[0m"
@@ -176,9 +180,13 @@ else
install -D -m 0644 -t "${completion_zsh_dest_path}" "${file}"
done
fi
if [ -e "distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')"/terminal-distrobox-icon.svg ]; then
install -D -m 0644 -t "${icon_dest_path}" \
"distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')"/terminal-distrobox-icon.svg
if [ -e "distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')"/icons/terminal-distrobox-icon.svg ]; then
install -D -m 0644 -t "${icon_dest_path}/scalable/apps" \
"distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')"icons/terminal-distrobox-icon.svg
for sz in 16 22 24 32 36 48 64 72 96 128 256; do
install -D -m 0644 -t "${icon_dest_path}/${sz}x${sz}/apps" \
icons/hicolor/"${sz}x${sz}"/apps/terminal-distrobox-icon.png
done
fi
# securely delete unneeded files