Update readme, use a sort order for install scripts

This commit is contained in:
david pickle 2025-01-25 20:57:03 -06:00
parent aa64550b72
commit 1c535ead24
10 changed files with 17 additions and 8 deletions

@ -1,6 +1,12 @@
### script run plan
- run `./pre_install_*` scripts
- run `./install_programs` to install/build/etc programs
- run `./copy_configs` to copy configs/scripts/executables into place
- run `./post_config_*` scripts
# repo containing configs and scripts to set up a box
### prerequisites
- install git if not already installed
- clone this repo
- if on macOS, install [homebrew](https://brew.sh/)
- export the env var `BOX_SETUP_OS` to indicate the operating system
-- (options defined in `set_env_vars` file)
### script run
- from the repo's root directory, run `./setup_this_box`

@ -18,8 +18,8 @@ while [[ $# > 0 ]]; do
done
log "install_programs // single_script_filter: $single_script_filter"
local scripts=(`find ./installs_and_builds -maxdepth 1 -mindepth 1 -type f`)
for script in $scripts; do
local scripts=$(find ./installs_and_builds -maxdepth 1 -mindepth 1 -type f | sort)
for script in ${=scripts}; do
if [[ -x $script ]]; then
if echo "$script" | grep -qv "$single_script_filter"; then
log "filter is $single_script_filter // ignoring: $script"

@ -1,4 +1,6 @@
[[ -z $BOX_SETUP_OS ]] && echo "BOX_SETUP_OS must be set" && exit 1
[[ -z $BOX_SETUP_OS ]] &&
echo "BOX_SETUP_OS must be set; options: arch, artix, debian, macos" &&
exit 1
local install_cmd=''
case $BOX_SETUP_OS in
@ -6,4 +8,5 @@ case $BOX_SETUP_OS in
(debian) export install_cmd="sudo apt install" ;;
(macos) export install_cmd="brew install" ;;
esac
export BOX_SETUP_INSTALL_COMMAND="$install_cmd"