From 96cf73afc9765f62c332c08e3fa9cdbe419633b3 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 11 Jun 2020 13:40:24 +0200 Subject: [PATCH] Remove not used helpers --- scripts/_common.sh | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b11e7c7..d93f982 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -22,26 +22,3 @@ extra_php_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql ph #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# Execute a command as another user -# usage: exec_as USER COMMAND [ARG ...] -exec_as() { - local USER=$1 - shift 1 - - if [[ $USER = $(whoami) ]]; then - eval $@ - else - # use sudo twice to be root and be allowed to use another user - sudo sudo -u "$USER" $@ - fi -} - -# -# Composer helpers -# - - -sudo_path () { - sudo env "PATH=$PATH" $@ -}