Add repair guide and install-software script
This commit is contained in:
parent
5e12e759e9
commit
a29744cc80
4 changed files with 52 additions and 3 deletions
19
README.md
19
README.md
|
@ -34,18 +34,21 @@ Running `install.sh` or `uninstall.sh` will delete and change some things in you
|
||||||
Please, do not modify any files. It will only cause issues during the update process. \
|
Please, do not modify any files. It will only cause issues during the update process. \
|
||||||
If you wish to make your own dotfiles repo, you can of course modify files and then make your own repository.
|
If you wish to make your own dotfiles repo, you can of course modify files and then make your own repository.
|
||||||
|
|
||||||
## Installing
|
## Managing
|
||||||
|
### Installing
|
||||||
|
This will remove all related files and install some software.
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.staropensource.de/JeremyStarTM/punktdateien.git "$HOME/.dotfiles"
|
git clone https://git.staropensource.de/JeremyStarTM/punktdateien.git "$HOME/.dotfiles"
|
||||||
cd "$HOME/.dotfiles"
|
cd "$HOME/.dotfiles"
|
||||||
./install.sh
|
./install.sh
|
||||||
|
bin/install-software
|
||||||
```
|
```
|
||||||
## Updating
|
### Updating
|
||||||
This will remove all related files, pull and then link everything again – automatically.
|
This will remove all related files, pull and then link everything again – automatically.
|
||||||
```bash
|
```bash
|
||||||
dotfiles-updater
|
dotfiles-updater
|
||||||
```
|
```
|
||||||
## Uninstalling
|
### Uninstalling
|
||||||
This will reset all programs to their original state and remove `~/.dotfiles` completely.
|
This will reset all programs to their original state and remove `~/.dotfiles` completely.
|
||||||
```bash
|
```bash
|
||||||
cd "$HOME/.dotfiles"
|
cd "$HOME/.dotfiles"
|
||||||
|
@ -53,3 +56,13 @@ env REMOVE_INSTALLBIT=true REMOVE_REPOSITORIES=true ./uninstall.sh
|
||||||
cd "$HOME"
|
cd "$HOME"
|
||||||
rm -rf "$HOME/.dotfiles"
|
rm -rf "$HOME/.dotfiles"
|
||||||
```
|
```
|
||||||
|
### Repairing
|
||||||
|
This will *should* repair any issues you could have with this repository.
|
||||||
|
```bash
|
||||||
|
cd "$HOME/.dotfiles"
|
||||||
|
env REMOVE_INSTALLBIT=true REMOVE_REPOSITORIES=true ./uninstall.sh
|
||||||
|
./install.sh
|
||||||
|
"$HOME/.local/bin/dotfiles-updater" --force
|
||||||
|
"$HOME/.local/bin/dotfiles-install-software"
|
||||||
|
``
|
||||||
|
If you are still facing issues, contact me.
|
||||||
|
|
34
bin/install-software
Executable file
34
bin/install-software
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/bash
|
||||||
|
if [ ! -f "/sbin/sudo" ]; then
|
||||||
|
echo ":: Error: \"/sbin/sudo\" not found, please install sudo."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ":: Detecting distribution"
|
||||||
|
if [ -f "/etc/os-release" ]; then
|
||||||
|
source /etc/os-release
|
||||||
|
fi
|
||||||
|
case "$ID" in
|
||||||
|
"arch")
|
||||||
|
echo ":: Detected ${PRETTY_NAME}, installing packages automatically"
|
||||||
|
if [ ! -f "/sbin/paru" ]; then
|
||||||
|
echo ":: Error: \"/sbin/paru\" not found, please install paru."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sudo paru -Syu --needed bash ncurses nano rustup bat moar fireplace fortune-mod cowsay ytfzf yt-dlp-git tar zstd bzip unrar unzip 7-zip binutils sdkman
|
||||||
|
rustup default nightly
|
||||||
|
rustup update
|
||||||
|
cargo install eza
|
||||||
|
curl -s "https://get.sdkman.io" | bash
|
||||||
|
export SDKMAN_DIR="$HOME/.sdkman"
|
||||||
|
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
|
sdk install java 17.0.9-graal
|
||||||
|
sdk selfupdate
|
||||||
|
sdk update
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo ":: No supported distribution found."
|
||||||
|
echo " Install these packages manually:"
|
||||||
|
echo " bash ncurses nano rustup bat moar fireplace fortune-mod cowsay ytfzf yt-dlp tar zstd gzip bzip unrar unzip 7z ['ar' or 'binutils']"
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -79,6 +79,7 @@ link "lone-files/dolphinrc" ".config/dolphinrc"
|
||||||
# punktdateien scripts
|
# punktdateien scripts
|
||||||
link "bin/updatechecker" ".local/bin/dotfiles-updatechecker"
|
link "bin/updatechecker" ".local/bin/dotfiles-updatechecker"
|
||||||
link "bin/updater" ".local/bin/dotfiles-updater"
|
link "bin/updater" ".local/bin/dotfiles-updater"
|
||||||
|
link "bin/install-software" ".local/bin/dotfiles-install-software"
|
||||||
|
|
||||||
# write install file
|
# write install file
|
||||||
echo "pls don't remove" > "$HOME/.config/.jstm_dotfiles"
|
echo "pls don't remove" > "$HOME/.config/.jstm_dotfiles"
|
||||||
|
|
|
@ -59,3 +59,4 @@ unlink ".config/dolphinrc"
|
||||||
# punktdateien scripts
|
# punktdateien scripts
|
||||||
unlink ".local/bin/dotfiles-updatechecker"
|
unlink ".local/bin/dotfiles-updatechecker"
|
||||||
unlink ".local/bin/dotfiles-updater"
|
unlink ".local/bin/dotfiles-updater"
|
||||||
|
unlink ".local/bin/dotfiles-install-software"
|
||||||
|
|
Loading…
Reference in a new issue