1
0
mirror of https://gitlab.com/ykkzde/posy-cursors synced 2024-10-27 20:44:10 +00:00
archive-posy-cursors/build.sh

70 lines
1.4 KiB
Bash
Raw Normal View History

2019-10-25 08:28:11 +00:00
#!/bin/bash
# Capitaine cursors, macOS inspired cursors based on KDE Breeze
# Copyright (c) 2016 Keefer Rourke <keefer.rourke@gmail.com>
# Modified to include white cursors by Efus10n - 4 Mar 2019
function create {
cd "$SRC"
mkdir -p x1 x1_25 x1_5 x2
# generate cursors
if [[ "$THEME" =~ White$ ]]; then
BUILD="$SRC"/../dist-white
else BUILD="$SRC"/../dist
fi
OUTPUT="$BUILD"/cursors
ALIASES="$SRC"/cursorList
if [ ! -d "$BUILD" ]; then
mkdir "$BUILD"
fi
if [ ! -d "$OUTPUT" ]; then
mkdir "$OUTPUT"
fi
echo -ne "Generating cursor theme...\\r"
for CUR in config/*.cursor; do
BASENAME="$CUR"
BASENAME="${BASENAME##*/}"
BASENAME="${BASENAME%.*}"
xcursorgen "$CUR" "$OUTPUT/$BASENAME"
done
echo -e "Generating cursor theme... DONE"
cd "$OUTPUT"
#generate aliases
echo -ne "Generating shortcuts...\\r"
while read ALIAS; do
FROM="${ALIAS#* }"
TO="${ALIAS% *}"
if [ -e $TO ]; then
continue
fi
ln -sr "$FROM" "$TO"
done < "$ALIASES"
echo -e "Generating shortcuts... DONE"
cd "$PWD"
echo -ne "Generating Theme Index...\\r"
INDEX="$OUTPUT/../index.theme"
if [ ! -e "$OUTPUT/../$INDEX" ]; then
touch "$INDEX"
echo -e "[Icon Theme]\nName=$THEME\n" > "$INDEX"
fi
echo -e "Generating Theme Index... DONE"
}
# generate pixmaps from svg source
SRC=$PWD/src
THEME="Posy"
create svg
# THEME="Capitaine Cursors - White"
# create svg-white