aboutsummaryrefslogtreecommitdiffstats
path: root/home-manager/packages/scripts/apps/deprecated/riR/config
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-04-03 18:45:02 +0200
committerene <ene@sils.li>2023-04-03 18:45:02 +0200
commit4dea0028b638b4e3a4c4002ddf8d00e639b142e3 (patch)
tree61e41b94427ff95290df55769b5c91be7bb9f887 /home-manager/packages/scripts/apps/deprecated/riR/config
parentFix(hm/packages/scripts): Add update script (diff)
downloadnixos-config-4dea0028b638b4e3a4c4002ddf8d00e639b142e3.zip
Fix(hm/packages/scripts): Remove deprecated scripts
Diffstat (limited to '')
-rwxr-xr-xhome-manager/packages/scripts/apps/deprecated/riR/config147
1 files changed, 0 insertions, 147 deletions
diff --git a/home-manager/packages/scripts/apps/deprecated/riR/config b/home-manager/packages/scripts/apps/deprecated/riR/config
deleted file mode 100755
index fd6cbc89..00000000
--- a/home-manager/packages/scripts/apps/deprecated/riR/config
+++ /dev/null
@@ -1,147 +0,0 @@
-#! /usr/bin/env dash
-# shellcheck source=/dev/null
-. %SHELL_LIBRARY_PATH
-
-git_repo_home="$XDG_CONFIG_HOME"/git_repo
-[ -d "$git_repo_home" ] || mkdir "$git_repo_home"
-launch_dir="$(dirname "$(readlink -f "$0")")"
-
-. "$launch_dir"/utils
-
-add() {
- name=$(basename "$1")
- while clean files | awk '{print $1}' | grep -w "^$name$" > /dev/null;do
- printf "\"%s\" already exists, new name for link: " "$name"
- read -r name
- done
- cp "$1" "$git_repo_home"/"$name"
- {
- printf "%s " "$name";
- printf "%s " "$1";
- printf "%s\n" "$(stat -c "%a" "$1")"
- } >> "$git_repo_home"/files
-}
-
-remove() {
- tmp=$(grepw "$1")
- if pre_check "$tmp";then
- file_path="$(awk '{print $2}' "$tmp")"
- file_name="$(awk '{print $1}' "$tmp")"
-
- rm "$git_repo_home"/"$file_name"
- grep -v "$1" "$git_repo_home"/files > "$tmp"
- cat "$tmp" > "$git_repo_home"/files
- fi
-}
-
-gitw() {
- git --git-dir="$git_repo_home"/.git --work-tree="$git_repo_home" "$@"
-}
-
-deploy_files() {
- tmp=$(grepw "$1")
- if pre_check "$tmp";then
- file_path="$(awk '{print $2}' "$tmp")"
- file_name="$(awk '{print $1}' "$tmp")"
- file_bits="$(awk '{print $3}' "$tmp")"
-
- if [ -e "$file_path" ] && ! cmp "$git_repo_home"/"$file_name" "$file_path" > /dev/null;then
- if overwrite_check "$file_path" "$file_name" "file" ;then
- cp -f "$git_repo_home"/"$file_name" "$file_path"
- fi
- elif cmp "$git_repo_home"/"$file_name" "$file_path" > /dev/null;then
- [ "$AUTO_GEN" = "Y" ] || msg "File is already deployed"
- else
- cp "$git_repo_home"/"$file_name" "$file_path"
- chmod "$file_bits" "$file_path"
- fi
- fi
-}
-
-update() {
- tmp=$(grepw "$1")
- if pre_check "$tmp";then
- file_path="$(awk '{print $2}' "$tmp")"
- file_name="$(awk '{print $1}' "$tmp")"
-
- if [ -e "$file_path" ] && ! cmp "$git_repo_home"/"$file_name" "$file_path" > /dev/null;then
- if overwrite_check "$file_path" "$file_name" "backup" ;then
- cp -f "$file_path" "$git_repo_home"/"$file_name"
- fi
- elif cmp "$git_repo_home"/"$file_name" "$file_path" > /dev/null;then
- [ "$AUTO_GEN" = "Y" ] || msg "File does not need to be updated"
- else
- die "File does not exist on the system!"
- fi
- fi
-}
-
-usage() {
- cat << EO
-This is config, an easy dotfiles backup service!
-
-help Outputs this help
-add Adds the specified files
-remove Removes the specified files
-commit Same as 'config git commit'
-git Runs git with the arguments in the backup directory
-deploy Copies the specified file, or all files to their location
-dump Dumps the 'files' file
-update Updates the specified file, or all files if none are supplied
-grep Searches for the supplied string in the 'files' file
-EO
-exit "$1"
-}
-
-case "$1" in
- "help")
- shift 1
- usage 0
- ;;
- "add")
- shift 1
- while [ "$1" != "" ];do
- add "$(readlink -f "$1")"
- shift 1
- done
- ;;
- "remove")
- shift 1
- shift_througth "remove" "$@"
- ;;
- "commit")
- shift 1
- gitw commit
- ;;
- "git")
- shift 1
- gitw "$@"
- ;;
- "deploy")
- shift 1
- shift_througth "deploy_files" "$@"
- ;;
- "dump")
- shift 1
- cat "$git_repo_home"/files
- ;;
- "update")
- shift 1
- shift_througth "update" "$@"
- ;;
- "grep")
- shift 1
- tmp=$(grepw "$1")
- cat "$tmp"
- ;;
- *)
- echo "Option $1 not recognized!"
- usage 1
- ;;
-
- esac
-
-
-
-
- if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi