[Git-commits] [grml/grml-live] 2207c4: config: port zsh scripts to bash for better portab...

Chris Hofstaedtler noreply at github.com
Fri Jun 20 20:52:00 CEST 2025


  Branch: refs/heads/zeha/bash
  Home:   https://github.com/grml/grml-live
  Commit: 2207c42d7f1384779fab1ad8e5a3e54e4c6b5a9c
      https://github.com/grml/grml-live/commit/2207c42d7f1384779fab1ad8e5a3e54e4c6b5a9c
  Author: Chris Hofstaedtler <ch at grml.org>
  Date:   2025-06-20 (Fri, 20 Jun 2025)

  Changed paths:
    M config/files/GRMLBASE/usr/bin/restore-config
    M config/files/GRMLBASE/usr/bin/save-config
    M config/files/GRMLBASE/usr/share/grml-autoconfig/autoconfig.functions

  Log Message:
  -----------
  config: port zsh scripts to bash for better portability

Port restore-config, save-config, and autoconfig.functions from zsh to bash
to improve portability and enable shellcheck coverage. Key changes:

- Convert zsh-specific syntax to bash equivalents:
  * Replace [[ pattern == *match* ]] with case statements
  * Convert zparseopts to manual argument parsing
  * Replace ${=variable} word splitting with standard bash
  * Fix |& redirection to 2>&1 | for compatibility
  * Convert pipestatus[1] to PIPESTATUS[0]

- Remove zsh dependencies:
  * Remove iszsh() function and setopt calls
  * Replace zsh math functions with bash arithmetic
  * Simplify easteregg function probability calculation

- Preserve functionality:
  * Maintain existing grml color system via lsb-functions
  * Keep all command-line options and behavior
  * Preserve error handling and user experience

All scripts now pass bash syntax validation and are covered by shellcheck
workflow for improved code quality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/grml/grml-live/settings/notifications


More information about the Git-commits mailing list