Alter root workflows to use su -c.

This commit is contained in:
me
2026-08-15 14:16:12 -07:00
parent 7d693a9186
commit eedc765074
+11 -5
View File
@@ -357,15 +357,21 @@ alias prod-pull="pull_prod_backups"
## Root Workflows ##
function go-root {
su
command="$1"
if [[ -z "$command" ]]; then
su
else
su -c "$command"
fi
}
alias root="go-root "
alias doas-root="go-root "
plex_dir='/data/user/0/com.plexapp.android/Plex Media Server/Sync/1'
plex_movie_dir="$plex_dir"/1
plex_series_dir="$plex_dir"/2
function plex {
go-root
cd "$plex_dir"
su -c "cd '$plex_dir'"
}
function pull-plex {
dest="$1"
@@ -373,9 +379,9 @@ function pull-plex {
dest=/sdcard/Movies/
fi
go-root
cp -Rv "$plex_dir"/{1,2}/* "$dest"
su -c "cp -Rv '$plex_dir'/{1,2}/* '$dest'"
}
alias get-plex="pull-plex"
## Finalize ##