diff --git a/README.md b/README.md index 66b14aa..034645a 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ From time-to-time, you'll want to update your system. Hopefully you'll do this m To update the system type into the terminal: ``` -coreupdate +update ``` The script does three things. It runs 'flatpak update' to update your Flatpak apps, it runs 'gem update' to update your Rails environment, and it runs 'sudo pacman -Syu' to update your Arch and Gnome installation. @@ -114,10 +114,10 @@ Note: sometimes, for whatever reason, the update barfs. Take a look at [https:// If you want to pull down "new" additions to Coredesktop, run in the terminal: ``` -corerefresh +refresh ``` -This will download the latest repo and run through the original installation script adding any "new" applications or services. You should run "coreupdate" after running "corerefresh". +This will download the latest repo and run through the original installation script adding any "new" applications or services. You should run "update" after running "refresh". ## mDNS Networking diff --git a/install.sh b/install.sh index 0621d15..de0f31e 100755 --- a/install.sh +++ b/install.sh @@ -48,10 +48,10 @@ else git clone https://gitea.federated.computer/david/coredesktop.git ~/.local/share/coredesktop fi -# Install the corerefresh and coreupdate management scripts to the user's bin +# Install the refresh and update management scripts to the user's bin mkdir -p ~/.local/bin -sudo cp ~/.local/share/coredesktop/corerefresh ~/.local/bin/corerefresh -sudo cp ~/.local/share/coredesktop/coreupdate ~/.local/bin/coreupdate +sudo cp ~/.local/share/coredesktop/refresh ~/.local/bin/refresh +sudo cp ~/.local/share/coredesktop/update ~/.local/bin/update cd ~/.local/share/coredesktop diff --git a/corerefresh b/refresh similarity index 100% rename from corerefresh rename to refresh diff --git a/remove-packages.conf b/remove-packages.conf index ddd6dad..72c2789 100644 --- a/remove-packages.conf +++ b/remove-packages.conf @@ -1,4 +1,4 @@ -# Packages to remove on next coreupdate run. +# Packages to remove on next update run. # Add entries here and they will be uninstalled automatically. # Pacman / AUR packages to remove (works for both pacman and yay packages) diff --git a/skills/sibling-project-updates.md b/skills/sibling-project-updates.md index 6fc6cf0..3c94381 100644 --- a/skills/sibling-project-updates.md +++ b/skills/sibling-project-updates.md @@ -2,14 +2,14 @@ ## Overview -CoreDesktop's `coreupdate` script sources every `*.sh` file found in +CoreDesktop's `update` script sources every `*.sh` file found in `~/.local/share/coredesktop/updates.d/` in filename order. A sibling project hooks into this system by installing a numbered shell script into that directory during its own install step. ## How It Works -When a user runs `coreupdate`: +When a user runs `update`: 1. The coredesktop repo at `~/.local/share/coredesktop` is pulled. 2. All `*.sh` files in `updates.d/` are **sourced** (not executed as subprocesses) @@ -63,7 +63,7 @@ echo "Registering MyProject update hook..." cp updates.d/70-myproject.sh ~/.local/share/coredesktop/updates.d/ ``` -This is a one-time step that wires the sibling into every future `coreupdate` +This is a one-time step that wires the sibling into every future `update` run on the machine. ## Available Helpers @@ -84,7 +84,7 @@ remove_packages "${MY_REMOVE_PACKAGES[@]}" ## Checklist for Sibling Project Authors - [ ] Create `updates.d/7X-.sh` in the sibling repo -- [ ] Hook script echoes its name so progress is visible during `coreupdate` +- [ ] Hook script echoes its name so progress is visible during `update` - [ ] Install step copies the hook to `~/.local/share/coredesktop/updates.d/` - [ ] Numeric prefix is 70+ (does not conflict with coredesktop's own hooks) - [ ] Script is idempotent — safe to run multiple times without side effects diff --git a/coreupdate b/update similarity index 88% rename from coreupdate rename to update index 3539002..b75266b 100755 --- a/coreupdate +++ b/update @@ -25,12 +25,12 @@ COREDESKTOP="$HOME/.local/share/coredesktop" echo "Updating CoreDesktop..." git -C "$COREDESKTOP" pull mkdir -p "$COREDESKTOP/updates.d" -sudo cp "$COREDESKTOP/coreupdate" ~/.local/bin/coreupdate -sudo cp "$COREDESKTOP/corerefresh" ~/.local/bin/corerefresh +sudo cp "$COREDESKTOP/update" ~/.local/bin/update +sudo cp "$COREDESKTOP/refresh" ~/.local/bin/refresh -if [[ -z "$COREUPDATE_REEXECED" ]]; then - export COREUPDATE_REEXECED=1 - exec ~/.local/bin/coreupdate +if [[ -z "$UPDATE_REEXECED" ]]; then + export UPDATE_REEXECED=1 + exec ~/.local/bin/update fi for plugin in "$COREDESKTOP/updates.d/"*.sh; do diff --git a/updates.d/00-rename-migration.sh b/updates.d/00-rename-migration.sh new file mode 100755 index 0000000..a4fc36b --- /dev/null +++ b/updates.d/00-rename-migration.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +COREDESKTOP="$HOME/.local/share/coredesktop" + +if [ -f ~/.local/bin/coreupdate ]; then + echo "Migrating coreupdate -> update..." + sudo cp "$COREDESKTOP/update" ~/.local/bin/update + sudo rm -f ~/.local/bin/coreupdate +fi + +if [ -f ~/.local/bin/corerefresh ]; then + echo "Migrating corerefresh -> refresh..." + sudo cp "$COREDESKTOP/refresh" ~/.local/bin/refresh + sudo rm -f ~/.local/bin/corerefresh +fi