From 26f4b6456245bce96a7453be7238be4fc68eea16 Mon Sep 17 00:00:00 2001 From: Phil Date: Tue, 20 May 2025 21:58:56 +0100 Subject: [PATCH] Reverted back to original installer --- install.sh | 48 +++++------------------------------------------- rofi/config.rasi | 2 -- 2 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 rofi/config.rasi diff --git a/install.sh b/install.sh index 6393f7e..27fe575 100755 --- a/install.sh +++ b/install.sh @@ -1,50 +1,12 @@ #!/bin/bash -## DOWNLOADED FROM GIT REPO ## +## DOWNLOADED FROM GITHUB ## # Find all dot files then if the original file exists, create a backup # Once backed up to {file}.dtbak symlink the new dotfile in place -for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n"); do - # Check if it's a file and if a symlink already exists - target_file="~/$file" - if [ -e $target_file ]; then - if [ -L $target_file ]; then - # If it's a symlink and points to the correct location, skip it - target_link=$(readlink $target_file) - if [ "$target_link" != "$PWD/$file" ]; then - mv -f $target_file{,.dtbak} # Backup existing symlink or file - fi - else - mv -f $target_file{,.dtbak} # Backup if it's not a symlink - fi +for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do + if [ -e ~/$file ]; then + mv -f ~/$file{,.dtbak} fi - ln -s $PWD/$file $target_file + ln -s $PWD/$file ~/$file done - -# Handle directories -for dir in $(find . -maxdepth 1 -name ".*" -type d); do - target_dir="~/$dir" - - # Create the directory in the target location if it doesn't exist - if [ ! -d $target_dir ]; then - mkdir -p $target_dir - fi - - # Now handle symlinks for files inside the directory - for subfile in $(find $dir -type f); do - relative_subfile="${subfile#$dir/}" - target_subfile="$target_dir/$relative_subfile" - - # Check if the symlink already exists and points to the correct location - if [ ! -e $target_subfile ]; then - ln -s $PWD/$subfile $target_subfile - elif [ -L $target_subfile ]; then - target_link=$(readlink $target_subfile) - if [ "$target_link" != "$PWD/$subfile" ]; then - mv -f $target_subfile{,.dtbak} # Backup existing symlink - ln -s $PWD/$subfile $target_subfile # Create new symlink - fi - fi - done -done - diff --git a/rofi/config.rasi b/rofi/config.rasi deleted file mode 100644 index 73df277..0000000 --- a/rofi/config.rasi +++ /dev/null @@ -1,2 +0,0 @@ -//@theme "/usr/share/rofi/themes/arthur.rasi" -@theme "/usr/share/rofi/themes/gruvbox-dark-soft.rasi"