Alter root workflows to use su -c.
This commit is contained in:
@@ -357,15 +357,21 @@ alias prod-pull="pull_prod_backups"
|
||||
## Root Workflows ##
|
||||
|
||||
function go-root {
|
||||
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 ##
|
||||
|
||||
Reference in New Issue
Block a user