From eddb346e3014d20ed19c919058fe774608d85471 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Sun, 28 Sep 2025 19:12:10 -0400 Subject: [PATCH] feat: Rearranges assets into env folder and updates script references. --- Makefile | 35 -------------------- dev-env | 2 +- {assets => env}/icons/housecallpro.png | Bin {assets => env}/icons/oryx.png | Bin {assets => env}/wallpapers/wall1.png | Bin {webapps => env/webapps}/excalidraw.json | 0 {webapps => env/webapps}/gitea.json | 0 {webapps => env/webapps}/github.json | 0 {webapps => env/webapps}/housecallpro.json | 0 {webapps => env/webapps}/hyprland-wiki.json | 0 {webapps => env/webapps}/immich.json | 0 {webapps => env/webapps}/oryx.json | 0 {webapps => env/webapps}/unifi.json | 0 {webapps => env/webapps}/youtube.json | 0 webapp | 19 +++++------ 15 files changed, 10 insertions(+), 46 deletions(-) delete mode 100644 Makefile rename {assets => env}/icons/housecallpro.png (100%) rename {assets => env}/icons/oryx.png (100%) rename {assets => env}/wallpapers/wall1.png (100%) rename {webapps => env/webapps}/excalidraw.json (100%) rename {webapps => env/webapps}/gitea.json (100%) rename {webapps => env/webapps}/github.json (100%) rename {webapps => env/webapps}/housecallpro.json (100%) rename {webapps => env/webapps}/hyprland-wiki.json (100%) rename {webapps => env/webapps}/immich.json (100%) rename {webapps => env/webapps}/oryx.json (100%) rename {webapps => env/webapps}/unifi.json (100%) rename {webapps => env/webapps}/youtube.json (100%) diff --git a/Makefile b/Makefile deleted file mode 100644 index 3473664..0000000 --- a/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -BREWPATH ?= /opt/homebrew/bin -BREW = $(BREWPATH)/brew -DOTS = $(BREWPATH)/dots -APPDIR ?= /Applications - -# This does not work inside of a make command. -bootstrap-homebrew: - xcode-select --install || true - source "$(PWD)/scripts/install-brew.sh" - -# Install the dots application manager. -install-dots: - "$(BREW)" tap m-housh/formula - "$(BREW)" install dots - -bootstrap-minimal: bootstrap-homebrew install-dots - "$(DOTS)" install --minimal "$(APPDIR)" - -bootstrap: bootstrap-homebrew install-dots - "$(DOTS)" install --full "$(APPDIR)" - -# make a local zsh configuration file, to extend -# the normal .zshrc for configuration that is only -# relevant on the local machine. -zshrc-local: - # check if a file already exists or not and create it if not. - test -f "$(PWD)/zsh/config/.zshrc-local" \ - || echo "#!/usr/bin/env zsh" > "$(PWD)/zsh/config/.zshrc-local" - # add symlink to appropriate location if doesn't exist. - test -L "$(HOME)/.config/zsh/.zshrc-local" \ - || ln -sfv "$(PWD)/zsh/config/.zshrc-local" "$(HOME)/.config/zsh/" - # open the file to edit. - vim "$(PWD)/zsh/config/.zshrc-local" - -default: bootstrap diff --git a/dev-env b/dev-env index 1db676b..7cae280 100755 --- a/dev-env +++ b/dev-env @@ -122,7 +122,7 @@ copy_files $DEV_ENV/env/.gnupg $HOME/.gnupg # Wallpapers mkdir $HOME/wallpapers -copy_files $DEV_ENV/assets/wallpapers $HOME/wallpapers +copy_files $DEV_ENV/env/wallpapers $HOME/wallpapers copy $DEV_ENV/dev-env $HOME/.local/scripts/dev-env diff --git a/assets/icons/housecallpro.png b/env/icons/housecallpro.png similarity index 100% rename from assets/icons/housecallpro.png rename to env/icons/housecallpro.png diff --git a/assets/icons/oryx.png b/env/icons/oryx.png similarity index 100% rename from assets/icons/oryx.png rename to env/icons/oryx.png diff --git a/assets/wallpapers/wall1.png b/env/wallpapers/wall1.png similarity index 100% rename from assets/wallpapers/wall1.png rename to env/wallpapers/wall1.png diff --git a/webapps/excalidraw.json b/env/webapps/excalidraw.json similarity index 100% rename from webapps/excalidraw.json rename to env/webapps/excalidraw.json diff --git a/webapps/gitea.json b/env/webapps/gitea.json similarity index 100% rename from webapps/gitea.json rename to env/webapps/gitea.json diff --git a/webapps/github.json b/env/webapps/github.json similarity index 100% rename from webapps/github.json rename to env/webapps/github.json diff --git a/webapps/housecallpro.json b/env/webapps/housecallpro.json similarity index 100% rename from webapps/housecallpro.json rename to env/webapps/housecallpro.json diff --git a/webapps/hyprland-wiki.json b/env/webapps/hyprland-wiki.json similarity index 100% rename from webapps/hyprland-wiki.json rename to env/webapps/hyprland-wiki.json diff --git a/webapps/immich.json b/env/webapps/immich.json similarity index 100% rename from webapps/immich.json rename to env/webapps/immich.json diff --git a/webapps/oryx.json b/env/webapps/oryx.json similarity index 100% rename from webapps/oryx.json rename to env/webapps/oryx.json diff --git a/webapps/unifi.json b/env/webapps/unifi.json similarity index 100% rename from webapps/unifi.json rename to env/webapps/unifi.json diff --git a/webapps/youtube.json b/env/webapps/youtube.json similarity index 100% rename from webapps/youtube.json rename to env/webapps/youtube.json diff --git a/webapp b/webapp index 3080c50..f4b40b0 100755 --- a/webapp +++ b/webapp @@ -4,8 +4,6 @@ # # This is used when setting up a new machine. -script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" - if [ -z "$DEV_ENV" ]; then echo "env var DEV_ENV needs to be present" exit 1 @@ -46,8 +44,8 @@ log() { } install() { - local file=$1 - local script="${script_dir}/env/.local/scripts/install-webapp" + local file=$DEV_ENV/env/webapps/$(basename $1) + local script="$DEV_ENV/env/.local/scripts/install-webapp" if [[ ! -x $script ]]; then log "Failed to find install web app script." @@ -56,13 +54,13 @@ install() { # Install local icons if needed mkdir -p $XDG_DATA_HOME/applications/icons - for i in $(find $script_dir/assets/icons -mindepth 1 -maxdepth 1 -type f); do + for i in $(find $DEV_ENV/env/icons -mindepth 1 -maxdepth 1 -type f); do if [[ ! -f $XDG_DATA_HOME/applications/icons/$i ]] && [[ $dry_run == "0" ]]; then cp $i $XDG_DATA_HOME/applications/icons fi done - log "Installing webapp from spec: $1" + log "Installing webapp from spec: $file" if [[ $dry_run == "0" ]]; then $script --file $file @@ -70,17 +68,18 @@ install() { } uninstall() { - local script="${script_dir}/env/.local/scripts/uninstall-webapp" + local file=$DEV_ENV/env/webapps/$(basename $1) + local script="$DEV_ENV/env/.local/scripts/uninstall-webapp" if [[ ! -x $script ]]; then log "Failed to find uninstall web app script." exit 1 fi - log "Uninstalling webapp from spec: $1" + log "Uninstalling webapp from spec: $file" if [[ $dry_run == "0" ]]; then - $script --file $1 + $script --file $file fi } @@ -88,7 +87,7 @@ uninstall() { log "WEBAPP: -- grep: $grep" -apps_dir=$(find $script_dir/webapps -mindepth 1 -maxdepth 1 -type f) +apps_dir=$(find $DEV_ENV/env/webapps -mindepth 1 -maxdepth 1 -type f) for s in $apps_dir; do if basename $s | grep -vq "$grep"; then