mirror of
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git
synced 2025-05-09 13:41:57 -04:00
Remove Papirus-Adapta{,-Nokto} from scripts #1499
This commit is contained in:
parent
7fa490415b
commit
b4988bd574
5 changed files with 2 additions and 114 deletions
2
Makefile
2
Makefile
|
@ -5,7 +5,7 @@ PREFIX ?= /usr
|
|||
IGNORE ?=
|
||||
|
||||
ifeq ($(strip $(THEMES)),)
|
||||
THEMES ?= ePapirus Papirus Papirus-Adapta Papirus-Adapta-Nokto Papirus-Dark Papirus-Light
|
||||
THEMES ?= ePapirus Papirus Papirus-Dark Papirus-Light
|
||||
endif
|
||||
|
||||
# excludes IGNORE from THEMES list
|
||||
|
|
|
@ -25,7 +25,7 @@ cat <<- EOF
|
|||
EOF
|
||||
|
||||
DESTDIR="${DESTDIR:-/usr/share/icons}"
|
||||
THEMES="${THEMES:-Papirus ePapirus Papirus-Dark Papirus-Light Papirus-Adapta Papirus-Adapta-Nokto}"
|
||||
THEMES="${THEMES:-Papirus ePapirus Papirus-Dark Papirus-Light}"
|
||||
BRANCH="${BRANCH:-master}"
|
||||
uninstall="${uninstall:-false}"
|
||||
|
||||
|
|
|
@ -50,15 +50,6 @@ add_class_e() {
|
|||
"$@"
|
||||
}
|
||||
|
||||
# Papirus-Adapta and Papirus-Adapta-Nokto
|
||||
add_class_adapta() {
|
||||
# add the class if a value matches:
|
||||
sed -i -r \
|
||||
-e '/([^-]color|fill|stop-color|stroke):(#414c52|#cfd8dc)/I s/(style="[^"]+")/\1 class="ColorScheme-Text"/' \
|
||||
-e '/([^-]color|fill|stop-color|stroke):#00bcd4/I s/(style="[^"]+")/\1 class="ColorScheme-Highlight"/' \
|
||||
"$@"
|
||||
}
|
||||
|
||||
# Symbolic
|
||||
add_class_symbolic() {
|
||||
# add the class if a value matches and class="warning" not exists:
|
||||
|
@ -91,9 +82,6 @@ for file in "$@"; do
|
|||
if grep -q -i 'color:\(#6e6e6e\|#ffffff\)' "$file"; then
|
||||
# it's ePapirus
|
||||
add_class_e "$file"
|
||||
elif grep -q -i 'color:\(#414c52\|#cfd8dc\)' "$file"; then
|
||||
# it's Papirus-Adapta or Papirus-Adapta-Nokto
|
||||
add_class_adapta "$file"
|
||||
elif grep -q -i 'color:\(#31363b\|#3daee9\)' "$file"; then
|
||||
# it's Papirus-Light
|
||||
add_class_light "$file"
|
||||
|
|
|
@ -34,7 +34,6 @@ SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
|
|||
TARGET_DIR="$SCRIPT_DIR/../Papirus"
|
||||
|
||||
DEFAULT_COLOR="blue"
|
||||
DEFAULT_ADAPTA_COLOR="cyan"
|
||||
SIZES_REGEX="(16x16|22x22|24x24|32x32|48x48|64x64)"
|
||||
COLOR_SIZES_REGEX="(22x22|24x24|32x32|48x48|64x64)"
|
||||
FILES_REGEX="(folder|user)-"
|
||||
|
@ -170,8 +169,6 @@ COLOR_NAMES="${!COLORS[*]}" # get a string of colors
|
|||
COLOR_REGEX="(${COLOR_NAMES// /|})" # convert the list of colors to regex
|
||||
DERIVATIVES=(
|
||||
ePapirus
|
||||
Papirus-Adapta
|
||||
Papirus-Adapta-Nokto
|
||||
Papirus-Dark
|
||||
Papirus-Light
|
||||
) # array of derivative icon themes with 16x16 places
|
||||
|
@ -184,24 +181,3 @@ find "$TARGET_DIR" -regextype posix-extended \
|
|||
cp -P --remove-destination "$file" "${file/Papirus/$d}"
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
headline "PHASE 6: Copy places icons to Pairus-Adapta ..."
|
||||
# -----------------------------------------------------------------------------
|
||||
for size in 22x22 24x24 32x32 48x48 64x64; do
|
||||
rsync -a --delete "$TARGET_DIR/$size/places" \
|
||||
"$TARGET_DIR/../Papirus-Adapta/$size/"
|
||||
done
|
||||
|
||||
|
||||
headline "PHASE 7: Remap symlinks for Papirus-Adapta ..."
|
||||
# -----------------------------------------------------------------------------
|
||||
find "$TARGET_DIR/../Papirus-Adapta" -type f -regextype posix-extended \
|
||||
-regex ".*/${COLOR_SIZES_REGEX}/places/${FILES_REGEX}${DEFAULT_ADAPTA_COLOR}[-\.].*" \
|
||||
-print0 | while read -r -d $'\0' file; do
|
||||
|
||||
target="$(basename "$file")"
|
||||
symlink="${file/-$DEFAULT_ADAPTA_COLOR/}"
|
||||
|
||||
ln -sf "$target" "$symlink"
|
||||
done
|
||||
|
|
|
@ -57,82 +57,6 @@ for theme in "${THEMES[@]##*/}"; do
|
|||
-e 's/#5c616c/#6e6e6e/gI' \
|
||||
-e 's/#d3dae3/#ffffff/gI' '{}' \;
|
||||
;;
|
||||
Papirus-Adapta)
|
||||
# copy files and symlinks
|
||||
find "$SOURCE_DIR" -maxdepth 1 -type d | while read -r dir; do
|
||||
context_dir=$(basename "$dir")
|
||||
|
||||
case "$context_dir" in
|
||||
actions)
|
||||
mkdir -p "$theme_dir/$context_dir"
|
||||
find "$SOURCE_DIR/$context_dir" \
|
||||
-name '*@16x16.svg' -print0 -o \
|
||||
-name '*@22x22.svg' -print0 -o \
|
||||
-name '*@24x24.svg' -print0 | xargs -0 -i \
|
||||
cp -afv '{}' "$theme_dir/$context_dir"
|
||||
;;
|
||||
devices)
|
||||
mkdir -p "$theme_dir/$context_dir"
|
||||
find "$SOURCE_DIR/$context_dir" \
|
||||
-name '*@16x16.svg' -print0 | xargs -0 -i \
|
||||
cp -afv '{}' "$theme_dir/$context_dir"
|
||||
;;
|
||||
panel)
|
||||
mkdir -p "$theme_dir/$context_dir"
|
||||
find "$SOURCE_DIR/$context_dir" \
|
||||
-name '*@16x16.svg' -print0 -o \
|
||||
-name '*@22x22.svg' -print0 -o \
|
||||
-name '*@24x24.svg' -print0 | xargs -0 -i \
|
||||
cp -afv '{}' "$theme_dir/$context_dir"
|
||||
;;
|
||||
places)
|
||||
mkdir -p "$theme_dir/$context_dir"
|
||||
find "$SOURCE_DIR/$context_dir" \
|
||||
-name '*@16x16.svg' -print0 -o \
|
||||
-name '*@22x22.svg' -print0 -o \
|
||||
-name '*@24x24.svg' -print0 -o \
|
||||
-name '*@32x32.svg' -print0 -o \
|
||||
-name '*@48x48.svg' -print0 -o \
|
||||
-name '*@64x64.svg' -print0 | xargs -0 -i \
|
||||
cp -afv '{}' "$theme_dir/$context_dir"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# convert color scheme
|
||||
find "$theme_dir" -type f -name '*.svg' -exec sed -i \
|
||||
-e 's/#5c616c/#414c52/gI' \
|
||||
-e 's/#d3dae3/#cfd8dc/gI' \
|
||||
-e 's/#5294e2/#00bcd4/gI' '{}' \;
|
||||
;;
|
||||
Papirus-Adapta-Nokto)
|
||||
# copy files and symlinks
|
||||
find "$SOURCE_DIR" -maxdepth 1 -type d | while read -r dir; do
|
||||
context_dir=$(basename "$dir")
|
||||
|
||||
case "$context_dir" in
|
||||
actions)
|
||||
mkdir -p "$theme_dir/$context_dir"
|
||||
find "$SOURCE_DIR/$context_dir" \
|
||||
-name '*@16x16.svg' -print0 -o \
|
||||
-name '*@22x22.svg' -print0 -o \
|
||||
-name '*@24x24.svg' -print0 | xargs -0 -i \
|
||||
cp -afv '{}' "$theme_dir/$context_dir"
|
||||
;;
|
||||
devices|places)
|
||||
mkdir -p "$theme_dir/$context_dir"
|
||||
find "$SOURCE_DIR/$context_dir" \
|
||||
-name '*@16x16.svg' -print0 | xargs -0 -i \
|
||||
cp -afv '{}' "$theme_dir/$context_dir"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# convert color scheme
|
||||
find "$theme_dir" -type f -name '*.svg' -exec sed -i \
|
||||
-e 's/#5c616c/#cfd8dc/gI' \
|
||||
-e 's/#5294e2/#00bcd4/gI' '{}' \;
|
||||
;;
|
||||
Papirus-Dark)
|
||||
# copy files and symlinks
|
||||
find "$SOURCE_DIR" -maxdepth 1 -type d | while read -r dir; do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue