update and refresh
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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-<project>.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
|
||||
|
||||
+5
-5
@@ -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
|
||||
Executable
+15
@@ -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
|
||||
Reference in New Issue
Block a user