breaking stuff with sqlite

This commit is contained in:
Q
2024-09-16 14:15:45 +03:00
parent 71e155fcde
commit 2193eeebd6
5 changed files with 220 additions and 17 deletions

View File

@@ -17,12 +17,18 @@ _current_mounts() {
cat /proc/mounts | grep fuse.rclone | awk '{ print $1 " " $2 }' | sed "s,$HOME,~," | xargs printf "%15s %s\n"
}
_get_remotes() {
if [[ -e ~/.config/rclone/rclone.conf ]]; then
cat ~/.config/rclone/rclone.conf | awk '/^\[/ {gsub(/[\[\]]/,"",$1);print($1 ":") }'
else
rclone --ask-password=false listremotes
fi
}
_menu() {
_current_mounts
_askpass
choice=$( rclone --ask-password=false listremotes | \
sort | \
choice=$( _get_remotes | \
smenu -t 1 -a c:0/2 i:3 -n 25 -m "Select remote" \
-N -D n:1 i:1 )
@@ -70,6 +76,12 @@ for (( i=1; i<=$#; i++ )); do
fi
done
if [[ -n "$remote" ]]; then
# see that remote has "
if [[ ! "$remote" == *":"* ]]; then
remote="$remote":
fi
fi
mkdir -p ~/mnt
valid_name=$( echo "${remote%:}" | sed -e 's/:/-/g' | sed -e 's/[^A-Za-z0-9._@-]//g' )