Add archival notice and make updater migrate
This commit is contained in:
parent
baaea05fe7
commit
e652f06f9e
2 changed files with 29 additions and 115 deletions
73
README.md
73
README.md
|
@ -1,68 +1,11 @@
|
|||
# jstm's dotfiles
|
||||
## Read this first!
|
||||
Running `install.sh` or `uninstall.sh` will delete and change some things in your home directory! Make sure to first read and understand both scripts before continuing.
|
||||
This repository has been archived, as it
|
||||
has been replaced by [JeremyStarTM/dotfiles](https://git.staropensource.de/JeremyStarTM/dotfiles).
|
||||
|
||||
## Managing
|
||||
### Installing
|
||||
These commands will remove some files and install software.
|
||||
Updating to the latest version will
|
||||
cause punktdateien to be replaced
|
||||
with dotfiles. The transition is
|
||||
seamless.
|
||||
|
||||
```bash
|
||||
# Clone repository
|
||||
git clone https://git.staropensource.de/JeremyStarTM/punktdateien.git "${HOME}/.dotfiles"
|
||||
cd "${HOME}/.dotfiles"
|
||||
|
||||
# Install and link files
|
||||
./install.sh
|
||||
|
||||
# Install software
|
||||
# Append --gui to install GUI packages too
|
||||
bin/install-software
|
||||
```
|
||||
### Updating
|
||||
These commands will remove some files, pull changes and link everything again. \
|
||||
Make sure to execute `dotfiles-install-software [-gui]` after updating.
|
||||
|
||||
```bash
|
||||
dotfiles-updater
|
||||
```
|
||||
### Uninstalling
|
||||
This will remove all installed files & directories and remove `~/.dotfiles` completely.
|
||||
|
||||
```bash
|
||||
# Unlink files
|
||||
cd "${HOME}/.dotfiles"
|
||||
env REMOVE_INSTALLBIT=true REMOVE_REPOSITORIES=true ./uninstall.sh
|
||||
|
||||
# Remove ~/.dotfiles
|
||||
cd "${HOME}"
|
||||
rm -rf ".dotfiles"
|
||||
```
|
||||
### Repairing
|
||||
This will *should* repair any issues you could have with this repository.
|
||||
|
||||
```bash
|
||||
cd "${HOME}/.dotfiles"
|
||||
|
||||
# Remove legacy links"
|
||||
./uninstall.sh --remove-legacy-paths
|
||||
./uninstall.sh --remove-unshared-bashrcd
|
||||
|
||||
# Unlink files
|
||||
env REMOVE_INSTALLBIT=true REMOVE_REPOSITORIES=true ./uninstall.sh
|
||||
|
||||
# Link files
|
||||
./install.sh
|
||||
|
||||
# Force update
|
||||
"${HOME}/.local/bin/dotfiles-updater" --force
|
||||
|
||||
# Install required software
|
||||
# Append --gui to install/update GUI packages too
|
||||
"${HOME}/.local/bin/dotfiles-install-software"
|
||||
```
|
||||
|
||||
If you are still facing issues, open an issue.
|
||||
|
||||
# Licensing
|
||||
All of my own scripts are licensed under the GNU AGPL v3. \
|
||||
Work of others may be licensed under different terms.
|
||||
To view the last version of this
|
||||
README.md, [see this link](https://git.staropensource.de/JeremyStarTM/punktdateien/src/commit/baaea05fe7603e1f4b5eb5cdc0706a7aafc8f1e5/README.md).
|
||||
|
|
71
bin/updater
71
bin/updater
|
@ -4,54 +4,25 @@ cd "${HOME}/.dotfiles" || (
|
|||
exit 1
|
||||
)
|
||||
|
||||
# Define updater version
|
||||
LOCAL_UPDATER_VERSION=4
|
||||
echo ":: S1 | Writing update script"
|
||||
|
||||
case "${STAGE}" in
|
||||
1)
|
||||
# 0 - 2 -> 3
|
||||
if [ -z "${UPDATER_VERSION}" ] || [ "${UPDATER_VERSION}" -lt "3" ]; then
|
||||
echo ":: S1 | Updating to UPDATER_VERSION 3"
|
||||
./uninstall.sh --remove-legacy-paths
|
||||
fi
|
||||
|
||||
# 3 -> 4
|
||||
if [ "${UPDATER_VERSION}" -lt "4" ]; then
|
||||
echo ":: S1 | Updating to UPDATER_VERSION 4"
|
||||
./uninstall.sh --remove-unshared-bashrcd
|
||||
fi
|
||||
|
||||
|
||||
echo ":: S1 | Uninstalling"
|
||||
./uninstall.sh
|
||||
|
||||
echo ":: S1 | Installing"
|
||||
./install.sh
|
||||
|
||||
# Remove legacy updater version file
|
||||
[[ -f "${HOME}/.config/.jstm_dotfiles_updater" ]] && rm -rf "${HOME}/.config/.jstm_dotfiles_updater"
|
||||
|
||||
echo ":: S1 | Update complete."
|
||||
echo " Make sure to execute \"dotfiles-install-software\""
|
||||
echo " to install/update required software."
|
||||
echo " Append \"--gui\" to install required GUI stuff."
|
||||
|
||||
;;
|
||||
*)
|
||||
echo ":: Checking for updates"
|
||||
|
||||
if [ ! "${1}" == "--force" ] && [ "$(env SCRIPTED=true dotfiles-updatechecker)" == "" ]; then
|
||||
echo ":: No update is available. Use \"--force\" to update anyway."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ":: S0 | Uninstalling"
|
||||
./uninstall.sh
|
||||
|
||||
echo ":: S0 | Pulling updates"
|
||||
git pull
|
||||
|
||||
exec env STAGE=1 UPDATER_VERSION=${LOCAL_UPDATER_VERSION} "${HOME}/.dotfiles/bin/updater"
|
||||
|
||||
;;
|
||||
esac
|
||||
# Write file
|
||||
cat << EOF > "/tmp/punktdateien-migrate.sh"
|
||||
echo ":: S1 | Removing punktdateien"
|
||||
rm -rf "${HOME}/.dotfiles"
|
||||
|
||||
echo ":: S1 | Cloning dotfiles"
|
||||
git clone "https://git.staropensource.de/JeremyStarTM/dotfiles.git" "${HOME}/.dotfiles"
|
||||
|
||||
echo ":: S1 | Linking dotfiles"
|
||||
"${HOME}/.dotfiles/manage.sh" link
|
||||
|
||||
echo ":: S1 | Removing update script"
|
||||
rm -rf "/tmp/punktdateien-migrate.sh"
|
||||
EOF
|
||||
|
||||
# Mark as executable
|
||||
chmod +x "/tmp/punktdateien-migrate.sh"
|
||||
|
||||
# Invoke
|
||||
exec /tmp/punktdateien-migrate.sh
|
||||
|
|
Loading…
Add table
Reference in a new issue