dotfile setup help

This commit is contained in:
pika 2025-06-02 21:15:51 +02:00
parent 3ca6551ce1
commit 4da0a958cc

View file

@ -77,6 +77,11 @@
git clone --depth=1 --recursive "${url}/${repo}" "${path}" git clone --depth=1 --recursive "${url}/${repo}" "${path}"
else else
if confirm "The path $path is already present! Do you want to move it now to $HOME/.bak?" </dev/tty; then if confirm "The path $path is already present! Do you want to move it now to $HOME/.bak?" </dev/tty; then
ls $HOME/.bak || mkdir $HOME/.bak
mv -f "$path" "$HOME/.bak/"
sleep 0.1
git clone --depth=1 --recursive "${url}/${repo}" "${path}" git clone --depth=1 --recursive "${url}/${repo}" "${path}"
else else
pen bold grey "Did not touch $path" pen bold grey "Did not touch $path"
@ -86,11 +91,19 @@
} }
ask-repo-setup() { ask-repo-setup() {
error() {
pen bold red "Error code $?"
exit $1
}
choose setup "Which repo should i setup for you?" "hyprdots" "minimal" </dev/tty choose setup "Which repo should i setup for you?" "hyprdots" "minimal" </dev/tty
if $creds; then if $creds; then
choose advanced "Do you also want to setup some other dotfiles?" "ssh" "private" "notes" no </dev/tty choose advanced "Do you also want to setup some other dotfiles?" "ssh" "private" "notes" no </dev/tty
[ -z "$GIT" ] && request GIT "The GIT variable is not set. This variable should identify your preferred git directory. Enter one now (if its not there, it will get created.. Try to use paths in your '$HOME' directory)" </dev/tty [ -z "$GIT" ] && request GIT "The GIT variable is not set. This variable should identify your preferred git directory. Enter one now (if its not there, it will get created.. Try to use paths in your '$HOME' directory)" </dev/tty
if [ ! -d "$GIT" ]; then
mkdir -p "$GIT" || error 69
fi
fi fi
# if $setup is empty, return 69 # if $setup is empty, return 69