diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..f788bac3 --- /dev/null +++ b/build.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# A script for preparing binaries of Bibata Cursors, by Abdulkaiz Khatri + +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 .. diff --git a/package.json b/package.json index 406bab07..83425743 100644 --- a/package.json +++ b/package.json @@ -4,14 +4,6 @@ }, "scripts": { "render": "npx cbmp render.json", - "build:bibata-modern-amber": "ctgen build.toml -d 'bitmaps/Bibata-Modern-Amber' -n 'Bibata-Modern-Amber' -c 'Yellowish and rounded edge Bibata cursors.'", - "build:bibata-modern-classic": "ctgen build.toml -d 'bitmaps/Bibata-Modern-Classic' -n 'Bibata-Modern-Classic' -c 'Black and rounded edge Bibata cursors.'", - "build:bibata-modern-ice": "ctgen build.toml -d 'bitmaps/Bibata-Modern-Ice' -n 'Bibata-Modern-Ice' -c 'White and rounded edge Bibata cursors.'", - "build:bibata-modern": "yarn build:bibata-modern-amber && yarn build:bibata-modern-classic && yarn build:bibata-modern-ice", - "build:bibata-original-amber": "ctgen build.toml -d 'bitmaps/Bibata-Original-Amber' -n 'Bibata-Original-Amber' -c 'Yellowish and sharp edge Bibata cursors.'", - "build:bibata-original-classic": "ctgen build.toml -d 'bitmaps/Bibata-Original-Classic' -n 'Bibata-Original-Classic' -c 'Black and sharp edge Bibata cursors.' ", - "build:bibata-original-ice": "ctgen build.toml -d 'bitmaps/Bibata-Original-Ice' -n 'Bibata-Original-Ice' -c 'White and sharp edge bibata cursors.'", - "build:bibata-original": "yarn build:bibata-original-amber && yarn build:bibata-original-classic && yarn build:bibata-original-ice", - "build": "yarn build:bibata-modern && yarn build:bibata-original" + "build": "yarn render && bash build.sh" } } diff --git a/release.sh b/release.sh deleted file mode 100755 index 1b4f5445..00000000 --- a/release.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -# A script for preparing binaries for version release of Bibata Cursors, by Abdulkaiz Khatri - -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 - -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 .. \ No newline at end of file