dotfiles/termux/scripts/tsu

7 lines
314 B
Bash
Executable file

#!/data/data/com.termux/files/usr/bin/env bash
# Force the passing of the environment variables on LineageOS where the --preserve-environment
# option on the su binary doesn't seem to work well
/data/data/com.termux/files/usr/bin/tsu -s "$(env | sed "s/^\([^=]\+\)=\(.*\)/\1='\2'/" | tr '\n' ' ') $(which bash)"