Bibata_Cursor/build.sh
Abdulkaiz Khatri 4f55f6c249 fix: Resolve Missing Windows Cursors
Added the missing `Person.cur` and `Pin.cur` cursors. Also, generated
the `Zoom-in` and `Zoom-out` cursors from the XCursor's source.

Some parts of `build.toml` were not parsed correctly and required the
698043bf3f17fd6edef39300e50a9533914d289a patch in `clickgen`.

Recommend using `clickgen` v2.1.8 or higher.

Fixes #133, #124
2023-09-14 09:25:00 +05:30

64 lines
1.8 KiB
Bash
Executable file

#!/bin/bash
# A script for preparing binaries of Bibata Cursors, by Abdulkaiz Khatri
error() (
set -o pipefail
"$@" 2> >(sed $'s,.*,\e[31m&\e[m,' >&2)
)
if ! type -p ctgen >/dev/null; then
error ctgen
exit 127 # exit program with "command not found" error code
fi
declare -A names
names["Bibata-Modern-Amber"]="Yellowish and rounded edge Bibata cursors."
names["Bibata-Modern-Classic"]="Black and rounded edge Bibata cursors."
names["Bibata-Modern-Ice"]="White and rounded edge Bibata cursors."
names["Bibata-Original-Amber"]="Yellowish and sharp edge Bibata cursors."
names["Bibata-Original-Classic"]="Black and sharp edge Bibata cursors."
names["Bibata-Original-Ice"]="White and sharp edge Bibata cursors."
# Cleanup old builds
rm -rf themes bin
# Building Bibata XCursor binaries
for key in "${!names[@]}"; do
comment="${names[$key]}"
ctgen build.toml -p x11 -d "bitmaps/$key" -n "$key" -c "$comment" &
PID=$!
wait $PID
done
# Building Bibata Windows binaries
for key in "${!names[@]}"; do
comment="${names[$key]}"
ctgen build.toml -p windows -s 16 -d "bitmaps/$key" -n "$key-Small" -c "$comment" &
ctgen build.toml -p windows -s 24 -d "bitmaps/$key" -n "$key-Regular" -c "$comment" &
ctgen build.toml -p windows -s 32 -d "bitmaps/$key" -n "$key-Large" -c "$comment" &
ctgen build.toml -p windows -s 48 -d "bitmaps/$key" -n "$key-Extra-Large" -c "$comment" &
PID=$!
wait $PID
done
# Compressing Binaries
mkdir -p bin
cd themes || exit
for key in "${!names[@]}"; do
tar -cJvf "../bin/${key}.tar.xz" "${key}" &
PID=$!
wait $PID
done
tar -cJvf "../bin/Bibata.tar.xz" --exclude="*-Windows" . &
PID=$!
wait $PID
for key in "${!names[@]}"; do
zip -rv "../bin/${key}-Windows.zip" "${key}-Small-Windows" "${key}-Regular-Windows" "${key}-Large-Windows" "${key}-Extra-Large-Windows" &
PID=$!
wait $PID
done
cd ..