mirror of
https://github.com/ublue-os/bazzite.git
synced 2024-12-29 12:22:20 +00:00
532190ecce
* feat(dev): add easy local iso and vscode integration * fix: remove unused variables.
15 lines
404 B
Bash
Executable File
15 lines
404 B
Bash
Executable File
#!/usr/bin/bash
|
|
function sudoif(){
|
|
if [[ "${TERM_PROGRAM}" == "vscode" && \
|
|
! -f /run/.containerenv && \
|
|
! -f /.dockerenv ]]; then
|
|
[[ $(command -v systemd-run) ]] && \
|
|
/usr/bin/systemd-run --uid=0 --gid=0 -d -E TERM="$TERM" -t -q -P -G "$@" \
|
|
|| exit 1
|
|
else
|
|
[[ $(command -v sudo) ]] && \
|
|
/usr/bin/sudo "$@" \
|
|
|| exit 1
|
|
fi
|
|
}
|