46 lines
1.5 KiB
Bash
46 lines
1.5 KiB
Bash
#! /usr/bin/env nix-shell
|
|
#! nix-shell -i bash -p bash gnome.zenity rmlint git gum xclip
|
|
|
|
if [ -n "$1" ]; then
|
|
operation=$1
|
|
else
|
|
operation=$(gum choose rmlint download git)
|
|
fi
|
|
|
|
case $operation in
|
|
# onlyfans)
|
|
# source ~/Development/Python/onlyfans/bin/activate.fish
|
|
# python ~/Development/Git/OnlyFans/start_ofd.py
|
|
# deactivate
|
|
rmlint)
|
|
rmlint -g --types="duplicates" \
|
|
--config=sh:handler=clone \
|
|
/mnt/pool/
|
|
;;
|
|
download)
|
|
ENTRY=$(zenity --entry --width=250 --title "Push Manager" \
|
|
--text="Verify the following entry is correct" \
|
|
--add-entry="Clipboard:" --entry-text "$(xclip -o -sel clip)")
|
|
if [ -n "$ENTRY" ]; then
|
|
# kgx -e "download -u jawz -i '$ENTRY'"
|
|
# ssh jawz@45.33.124.254 "echo ""$ENTRY"" >> ~/.config/jawz/lists/jawz/instant.txt"
|
|
kgx -e "ssh jawz@45.33.124.254 ""~/.local/bin/download -u jawz -i ""$ENTRY"" "" "
|
|
else
|
|
zenity --error --width=250 \
|
|
--text "Please verify and try again"
|
|
fi
|
|
;;
|
|
git)
|
|
git_dir=$HOME/Development/Git
|
|
while IFS= read -r repo; do
|
|
if ! [ -d "$repo/.git" ]; then
|
|
continue
|
|
fi
|
|
cd "$repo" || exit
|
|
gum style --foreground 2 "Updating $(basename "$repo")"
|
|
git fsck --full
|
|
git pull
|
|
done < <(fd . "$git_dir" -td --absolute-path -d 1)
|
|
;;
|
|
esac
|