mirror of
https://github.com/mrfluffy-dev/oreo-cursor.git
synced 2026-01-17 05:40:34 +00:00
inkscape 1.0 support thx @SmartFinn #1
This commit is contained in:
14
build.sh
14
build.sh
@@ -1,11 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Tiny cursors, based on KDE Breeze
|
||||
# Oreo cursors, based on KDE Breeze
|
||||
# Copyright (c) 2016 Keefer Rourke <keefer.rourke@gmail.com>
|
||||
# Copyright (c) 2020 Sergei Eremenko <https://github.com/SmartFinn>
|
||||
|
||||
set -e
|
||||
|
||||
INKSCAPE_VERSION=$(inkscape --version 2>/dev/null | awk '/Inkscape[ ]/ {print $2; exit}')
|
||||
|
||||
convert_to_png() {
|
||||
local src_dir="$1"
|
||||
local out_dir="${2:-.}"
|
||||
@@ -29,9 +31,15 @@ convert_to_png() {
|
||||
continue
|
||||
fi
|
||||
|
||||
printf '%s\0%s\0%s\0' "$bitmap_file" "$size" "$file"
|
||||
if [ "${INKSCAPE_VERSION%%.*}" -eq 0 ]; then
|
||||
printf 'inkscape -z -e "%s" -w %s -h %s "%s"\0' \
|
||||
"$bitmap_file" "$size" "$size" "$file"
|
||||
else
|
||||
printf 'inkscape -o "%s" -w %s -h %s "%s"\0' \
|
||||
"$bitmap_file" "$size" "$size" "$file"
|
||||
fi
|
||||
done
|
||||
done | xargs -r -0 -n 3 -P "$(nproc)" sh -c 'inkscape -z -e "$0" -w $1 -h $1 "$2"'
|
||||
done | xargs -r -0 -n 1 -P "$(nproc)" sh -c
|
||||
}
|
||||
|
||||
convert_to_x11cursor() {
|
||||
|
||||
Reference in New Issue
Block a user