11#! /bin/bash
2- # Build custom CVH Linux packages
3- # Creates cvh-fuzzy, cvh-icons, and cvh-branding packages
2+ # Build custom CodeVerse Linux packages
3+ # Creates codeverse-fuzzy, codeverse-icons, and codeverse-branding packages
4+ #
5+ # USAGE: ./build-packages.sh [OPTIONS]
6+ #
7+ # Run './build-packages.sh --help' for more detailed information.
48
59set -euo pipefail
610
@@ -23,6 +27,25 @@ log_success() { echo -e "${GREEN}[OK]${NC} $1"; }
2327log_warn () { echo -e " ${YELLOW} [WARN]${NC} $1 " ; }
2428log_error () { echo -e " ${RED} [ERROR]${NC} $1 " ; }
2529
30+ # Show usage
31+ usage () {
32+ echo " ============================================="
33+ echo " CodeVerse Linux Package Build Script"
34+ echo " ============================================="
35+ echo
36+ echo " Description: Builds custom packages (fuzzy, icons, branding)"
37+ echo " and AUR dependencies for CodeVerse Linux."
38+ echo
39+ echo " Usage: ./$( basename " $0 " ) [OPTIONS]"
40+ echo
41+ echo " Options:"
42+ echo " -h, --help Show this help message and exit"
43+ echo
44+ echo " Examples:"
45+ echo " ./$( basename " $0 " ) # Build all required packages"
46+ echo
47+ }
48+
2649# Check for Rust
2750check_rust () {
2851 if ! command -v cargo & > /dev/null; then
@@ -163,11 +186,11 @@ create_fuzzy_pkgbuild() {
163186
164187 # Use absolute path in PKGBUILD
165188 cat > " $PKGBUILD_DIR /cvh-fuzzy/PKGBUILD" << EOF
166- # Maintainer: CVH Linux Team
189+ # Maintainer: CodeVerse Linux Team
167190pkgname=cvh-fuzzy
168191pkgver=0.1.0
169192pkgrel=1
170- pkgdesc="Universal fuzzy finder for CVH Linux"
193+ pkgdesc="Universal fuzzy finder for CodeVerse Linux"
171194arch=('x86_64')
172195url="https://github.com/codeversehub/cvh-linux"
173196license=('GPL3')
@@ -188,7 +211,7 @@ package() {
188211
189212 # Install shell integration
190213 install -Dm644 /dev/stdin "\$ pkgdir/usr/share/cvh-fuzzy/shell/zsh.zsh" <<'ZSHEOF'
191- # CVH Fuzzy Zsh Integration
214+ # CodeVerse Linux Fuzzy Zsh Integration
192215if command -v cvh-fuzzy &> /dev/null; then
193216 cvh-fuzzy-file-widget() {
194217 local selected=\$ (cvh-fuzzy --mode files)
@@ -221,11 +244,11 @@ create_icons_pkgbuild() {
221244
222245 # Use absolute path in PKGBUILD
223246 cat > " $PKGBUILD_DIR /cvh-icons/PKGBUILD" << EOF
224- # Maintainer: CVH Linux Team
247+ # Maintainer: CodeVerse Linux Team
225248pkgname=cvh-icons
226249pkgver=0.1.0
227250pkgrel=1
228- pkgdesc="Sandboxed Lua-scriptable desktop icons for CVH Linux"
251+ pkgdesc="Sandboxed Lua-scriptable desktop icons for CodeVerse Linux"
229252arch=('x86_64')
230253url="https://github.com/codeversehub/cvh-linux"
231254license=('GPL3')
@@ -250,7 +273,7 @@ package() {
250273
251274 # Install default config
252275 install -Dm644 /dev/stdin "\$ pkgdir/etc/cvh-icons/config.toml" <<'CONFEOF'
253- # CVH Icons Configuration
276+ # CodeVerse Linux Icons Configuration
254277icon_size = 64
255278grid_spacing = 20
256279font_size = 12.0
@@ -278,11 +301,11 @@ create_branding_pkgbuild() {
278301 mkdir -p " $PKGBUILD_DIR /cvh-branding"
279302
280303 cat > " $PKGBUILD_DIR /cvh-branding/PKGBUILD" << EOF
281- # Maintainer: CVH Linux Team
304+ # Maintainer: CodeVerse Linux Team
282305pkgname=cvh-branding
283306pkgver=0.1.0
284307pkgrel=1
285- pkgdesc="CVH Linux branding, GRUB theme, and default configurations"
308+ pkgdesc="CodeVerse Linux branding, GRUB theme, and default configurations"
286309arch=('any')
287310url="https://github.com/codeversehub/cvh-linux"
288311license=('GPL3')
@@ -294,7 +317,7 @@ _cvh_root="$PROJECT_ROOT"
294317package() {
295318 # MOTD - welcome message
296319 install -Dm644 /dev/stdin "\$ pkgdir/etc/motd" <<'MOTDEOF'
297- Welcome to CVH Linux!
320+ Welcome to CodeVerse Linux!
298321
299322Quick Start:
300323 - Mod+Return Open terminal
@@ -306,10 +329,10 @@ Quick Start:
306329For more info: https://github.com/codeversehub/cvh-linux
307330MOTDEOF
308331
309- # CVH Linux info file
332+ # CodeVerse Linux info file
310333 install -Dm644 /dev/stdin "\$ pkgdir/usr/share/cvh-linux/info" <<'INFOEOF'
311- NAME="CVH Linux"
312- PRETTY_NAME="CVH Linux"
334+ NAME="CodeVerse Linux"
335+ PRETTY_NAME="CodeVerse Linux"
313336ID=cvh
314337VERSION_ID=0.1
315338HOME_URL="https://codeversehub.dev"
@@ -464,9 +487,24 @@ update_repo_db() {
464487
465488# Main
466489main () {
490+ # Parse arguments
491+ while [[ $# -gt 0 ]]; do
492+ case $1 in
493+ -h|--help)
494+ usage
495+ exit 0
496+ ;;
497+ * )
498+ log_error " Unknown option: $1 "
499+ echo " Run '$0 --help' for usage information."
500+ exit 1
501+ ;;
502+ esac
503+ done
504+
467505 echo
468506 echo " ╔════════════════════════════════════════════╗"
469- echo " ║ CVH Linux Package Build Script ║"
507+ echo " ║ CodeVerse Linux Package Build Script ║"
470508 echo " ╚════════════════════════════════════════════╝"
471509 echo
472510
@@ -498,4 +536,5 @@ main() {
498536 echo
499537}
500538
501- main " $@ "
539+ # Call main with all arguments
540+ main " $@ "
0 commit comments