diff --git a/README.md b/README.md index c0d61c7..2b52175 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ### script run plan -- run `./pre_run*` scripts -- run `./run` to install/build/etc programs +- 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 +- run `./post_config_*` scripts diff --git a/run b/install_programs similarity index 80% rename from run rename to install_programs index 164dfd4..694911e 100755 --- a/run +++ b/install_programs @@ -18,9 +18,9 @@ while [[ $# > 0 ]]; do done local script_dir=$(cd $(dirname "${ZSH_SOURCE[0]}") &> /dev/null && pwd) -log "run // script_dir: $script_dir -- args: $single_script_filter" +log "install_programs // script_dir: $script_dir -- args: $single_script_filter" cd $script_dir -local scripts=(`find ./runs -maxdepth 1 -mindepth 1 -type f`) +local scripts=(`find ./installs_and_builds -maxdepth 1 -mindepth 1 -type f`) for script in $scripts; do if [[ -x $script ]]; then if echo "$script" | grep -qv "$single_script_filter"; then diff --git a/runs/fzf b/installs_and_builds/fzf similarity index 100% rename from runs/fzf rename to installs_and_builds/fzf diff --git a/runs/git b/installs_and_builds/git similarity index 100% rename from runs/git rename to installs_and_builds/git diff --git a/installs_and_builds/libs b/installs_and_builds/libs new file mode 100755 index 0000000..9b47564 --- /dev/null +++ b/installs_and_builds/libs @@ -0,0 +1,6 @@ +#!/bin/zsh + +local lua_package="lua5.1" +[[ "$BOX_SETUP_OS" = "macos" ]] && lua_package="lua@5.1" + +$BOX_SETUP_INSTALL_COMMAND cmake gettext "$lua_package" liblua5.1-0-dev diff --git a/installs_and_builds/neovim b/installs_and_builds/neovim new file mode 100755 index 0000000..4493acc --- /dev/null +++ b/installs_and_builds/neovim @@ -0,0 +1,3 @@ +#!/bin/zsh + +brew install neovim diff --git a/runs/neovim b/installs_and_builds/neovim_from_source similarity index 51% rename from runs/neovim rename to installs_and_builds/neovim_from_source index 68d2218..a0c17d6 100755 --- a/runs/neovim +++ b/installs_and_builds/neovim_from_source @@ -1,22 +1,18 @@ #!/bin/zsh -local install_command="sudo apt install" -[[ -x $(which brew) ]] && install_command="brew install" - -local neovim_dir=$HOME/.local/build/neovim -local neovim_version="v0.10.3" -[ ! -z $NVIM_VERSION ] && neovim_version="$NVIM_VERSION" -echo "neovim_version: \"$neovim_version\"" - -[ ! -d $neovim_dir ] && git clone https://github.com/neovim/neovim.git $neovim_dir -git -C $neovim_dir fetch --all -git -C $neovim_dir checkout $neovim_version - -$install_command cmake gettext lua@5.1 liblua5.1-0-dev - -make -C $neovim_dir clean -make -C $neovim_dir CMAKE_BUILD_TYPE=RelWithDebInfo -sudo make -C $neovim_dir install +# local neovim_dir=$HOME/.local/build/neovim +# local neovim_version="v0.10.3" +# [ ! -z $NVIM_VERSION ] && neovim_version="$NVIM_VERSION" +# echo "neovim_version: \"$neovim_version\"" +# +# [ ! -d $neovim_dir ] && git clone https://github.com/neovim/neovim.git $neovim_dir +# git -C $neovim_dir fetch --all +# git -C $neovim_dir checkout $neovim_version +# +# +# make -C $neovim_dir clean +# make -C $neovim_dir CMAKE_BUILD_TYPE=RelWithDebInfo +# sudo make -C $neovim_dir install # lines below from primeagen's dev repo, uncomment/edit as needed # git clone https://github.com/ThePrimeagen/harpoon.git $HOME/personal/harpoon diff --git a/runs/tmux b/installs_and_builds/tmux similarity index 100% rename from runs/tmux rename to installs_and_builds/tmux diff --git a/runs/utils b/installs_and_builds/utils similarity index 100% rename from runs/utils rename to installs_and_builds/utils diff --git a/pre_run_01 b/pre_install_01 similarity index 53% rename from pre_run_01 rename to pre_install_01 index bffdee2..c6f3718 100755 --- a/pre_run_01 +++ b/pre_install_01 @@ -8,4 +8,15 @@ mkdirs_before_copying_config_files() { [[ ! -d $HOME/.local/tmp ]] && mkdir $HOME/.local/tmp } +[[ -z $BOX_SETUP_OS ]] && echo "BOX_SETUP_OS must be set" && exit 1 + +local install_cmd='' +case $BOX_SETUP_OS in + (arch | artix) install_cmd="sudo pacman -S" ;; + (debian) export install_cmd="sudo apt install" ;; + (macos) export install_cmd="brew install" ;; +esac +export BOX_SETUP_INSTALL_COMMAND="$install_cmd" + mkdirs_before_copying_config_files + diff --git a/runs/libs b/runs/libs deleted file mode 100755 index fd3ea1a..0000000 --- a/runs/libs +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/zsh -# brew install