bash-merger is a shell script utility designed to merge multiple shell scripts into a single script. This can be useful for consolidating scripts for easier distribution or deployment.
- Merges multiple shell scripts into a single script.
- Allows for custom configuration via a config file.
- Checks for the existence and readability of scripts before merging.
- Get latest version of the script.
wget https://raw.githubusercontent.com/soliyte/bash-merger/releases/latest/merge.sh
or
curl -O https://raw.githubusercontent.com/soliyte/bash-merger/releases/latest/merge.sh
- Make it executable
chmod +x merge.sh
- Run
./merge.sh -r <run_directory> -c <config_file>
-r <run_directory>: The directory containing the scripts or script directories to merge.-c <config_file>: The configuration file containing the list of scripts to merge.
The configuration file (merge-config.sh by default) allows you to specify the following:
OUT_DIR: The output directory for the merged script.OUT_FILE_NAME: The name of the merged script.SCRIPT_DIRECTORIES: An array of directories containing the scripts to be merged.
You can find examples of configuration files in the examples directory.
This project is licensed under the MIT License - see the LICENSE file for details.