Update readme, use a sort order for install scripts

This commit is contained in:
david 2025-04-04 16:55:39 -05:00
parent fc189d33d3
commit a277b12884
11 changed files with 23 additions and 10 deletions

View File

@ -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`

View File

@ -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"

View File

@ -1,4 +1,8 @@
#!/bin/zsh
[[ ! -d $HOMEBOX ]] && mkdir $HOMEBOX
[[ ! -d $DEVDIR ]] && mkdir $DEVDIR
[[ ! -d "$HOMEBOX" ]] && mkdir $HOMEBOX
[[ ! -d "$DEVDIR" ]] && mkdir $DEVDIR
[[ ! -d "$DEVDIR/git" ]] && mkdir $DEVDIR/git
[[ ! -d "$DEVDIR/git/me" ]] && mkdir $DEVDIR/git/me
[[ ! -d "$DEVDIR/git/other" ]] && mkdir $DEVDIR/git/other

View File

@ -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"