mostly replace wcd with self made script
[distro-setup] / conflink
index b045711f75dc04cf9ed7033b0137043a1c1437e8..1cefd0bd3f7bad668d25e380b717c80a51689b7e 100755 (executable)
--- a/conflink
+++ b/conflink
@@ -18,10 +18,10 @@ EOF
 }
 
 
+s() { sudo "$@"; }
 m() {
   "$@"
 }
-s() { sudo "$@"; }
 v() {
   echo "$*"
   "$@"
@@ -117,7 +117,7 @@ common-file-setup() {
             --exclude='/etc/exim4/passwd*'
             --exclude='/etc/exim4/*.pem'
             $fs/ / )
-      m "${cmd[@]@Q}"
+      echo "${cmd[@]@Q}"
       while read -r line; do
         file="${line:12}"
         case $file in
@@ -219,7 +219,7 @@ case $user in
       m s chgrp -R bind $f
       m s chmod g+w $f
     fi
-    sudo bash -c 'shopt -s nullglob; for f in /etc/bind/*.key /etc/bind/*.private /etc/bind/key.*; do chgrp bind $f; done'
+    s bash -c 'shopt -s nullglob; for f in /etc/bind/*.key /etc/bind/*.private /etc/bind/key.*; do chgrp bind $f; done'
     if [[ -e /etc/caldav-htpasswd ]] && getent group www-data &>/dev/null; then
       s chgrp www-data /etc/caldav-htpasswd
     fi
@@ -245,7 +245,7 @@ case $user in
     ##### end special extra stuff #####
 
     if ! $fast; then
-      m sudo -H -u user2 "${BASH_SOURCE[0]}"
+      m s -H -u user2 "${BASH_SOURCE[0]}"
     fi
 
     f=/a/bin/distro-setup/system-status