diff options
author | Britney Fransen <brfransen@gmail.com> | 2013-08-05 20:48:09 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2013-08-05 20:48:09 (GMT) |
commit | 7d94828393cc26fbb4951f88794bf8d7636fbc81 (patch) | |
tree | 2e31026ecc15007e89da3b6cc7c1481ab61db6e9 | |
parent | 1f8607372165fc4ec669a20d8e0397ba71571056 (diff) | |
download | linhes_dev-7d94828393cc26fbb4951f88794bf8d7636fbc81.zip |
setup_env.sh: add su -c to commands to work when run not as root.
-rwxr-xr-x | setup_env.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/setup_env.sh b/setup_env.sh index 1d80511..3c40231 100755 --- a/setup_env.sh +++ b/setup_env.sh @@ -168,7 +168,7 @@ then exit 1 fi #clear out the default resolve.conf -mv -f ../build_root.$ARCH/etc/resolv.conf ../build_root.$ARCH/etc/resolv.conf.orig +su -c "mv -f ../build_root.$ARCH/etc/resolv.conf ../build_root.$ARCH/etc/resolv.conf.orig" if [ x$FOUNDTEMPLATE = xTRUE ] then @@ -188,8 +188,8 @@ fi #create custom enter_dev_chroot.sh script #sed -e "s/REPLACEME/$ARCH/g" templates/enter_dev_chroot.sh > ../enter_dev_chroot.$ARCH.sh -cp templates/enter_dev_chroot.sh ../enter_dev_chroot.$ARCH -chmod 755 ../enter_dev_chroot.$ARCH +su -c "cp templates/enter_dev_chroot.sh ../enter_dev_chroot.$ARCH" +su -c "chmod 755 ../enter_dev_chroot.$ARCH" printf "%s\n" "********************************************************" printf "** %-50s **\n" " To enter the chroot (build_root.$ARCH) run:" @@ -204,9 +204,9 @@ printf "** %-50s **\n" " (it will error out but thats ok) " printf "%s\n" "********************************************************" #copy makepkg.conf into the chroot -sed -e "s/REPLACEME/$ARCH/g" templates/makepkg.conf > ../build_root.$ARCH/etc/makepkg.conf +su -c "sed -e "s/REPLACEME/$ARCH/g" templates/makepkg.conf > ../build_root.$ARCH/etc/makepkg.conf" #copy pacman.conf into the chroot -sed -e "s/REPLACEME/$ARCH/g" templates/pacman.conf.chroot > ../build_root.$ARCH/etc/pacman.conf +su -c "sed -e "s/REPLACEME/$ARCH/g" templates/pacman.conf.chroot > ../build_root.$ARCH/etc/pacman.conf" cd .. |