feat: Rearranges assets into env folder and updates script references.

This commit is contained in:
2025-09-28 19:12:10 -04:00
parent 1a3442dee7
commit eddb346e30
15 changed files with 10 additions and 46 deletions

View File

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

View File

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

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

19
webapp
View File

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