summaryrefslogtreecommitdiff
path: root/build/private-icon-theme-installer
blob: 00f0ffecd67b56a119e8f1d7b18e00bd52479ebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash

mkinstalldirs=$1; shift
install_data=$1; shift
action=$1; shift
dest_dir=$1; shift
src_dir=$1; shift

for icon in $@; do
	dest_dir_build="${dest_dir}/icons/hicolor/$(dirname ${icon})"
	if [[ ${action} == "-i" || ${action} == "-il" ]]; then
		src_file="${src_dir}/ThemeIcons/${icon}"
		$mkinstalldirs "${dest_dir_build}" &>/dev/null
		if [[ ${action} == "-i" ]]; then 
			echo "Installing private icon theme icon: ${icon}"
		fi
		$install_data "${src_file}" "${dest_dir_build}"
	else
		echo "Uninstalling private icon theme icon: ${icon}"
		rm -f "${dest_dir_build}/$(basename ${icon})"
	fi
done