diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-06-02 18:05:42 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-06-02 18:05:42 -0300 |
commit | 2471d64295214cbc03cb499fda9d8744a5e71beb (patch) | |
tree | d369d2727edf65ee48bad9e7741c79cad5d1529e /share | |
parent | b81f64ae48bbab40fea4e489cd84892bb685d4d0 (diff) | |
download | hydra-2471d64295214cbc03cb499fda9d8744a5e71beb.tar.gz hydra-2471d64295214cbc03cb499fda9d8744a5e71beb.tar.bz2 |
Adds sudo config into remove-dep
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydractl/remove-dep | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/share/hydractl/remove-dep b/share/hydractl/remove-dep index f5f2537..5e1a732 100755 --- a/share/hydractl/remove-dep +++ b/share/hydractl/remove-dep @@ -30,6 +30,11 @@ if [ -z "$1" ]; then exit 1 fi -aptitude markauto $(apt-cache showsrc "$1" \ +# Set sudo config +if [ "`whoami`" != 'root' ]; then + sudo="sudo" +fi + +$sudo aptitude markauto $(apt-cache showsrc "$1" \ | grep Build-Depends \ | perl -p -e 's/(?:[\[(].+?[\])]|Build-Depends:|,|\|)//g') |