File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash -eu
2-
32if [ -n " ${CREW_DEST_PREFIX} " ]; then
43 INSTALL_PREFIX=" ${CREW_DEST_PREFIX} "
54else
65 : " ${INSTALL_PREFIX:=/ usr/ local} "
76fi
87
9- if [ ${EUID} != 0 ] && [ ! -w ${INSTALL_PREFIX} ]; then
10- echo " Please run this script as root." 2>&1
11- exit 1
12- fi
8+ mkdir -p ${INSTALL_PREFIX} ${INSTALL_PREFIX} /{lib,bin}
139
14- mkdir -p ${INSTALL_PREFIX} /lib
1510cp -r . ${INSTALL_PREFIX} /lib/crew-sudo
1611
17- mkdir -p ${INSTALL_PREFIX} /bin
1812ln -sf ../lib/crew-sudo/crew-sudo ${INSTALL_PREFIX} /bin/crew-sudo
1913ln -sf ../lib/crew-sudo/crew-sudo ${INSTALL_PREFIX} /bin/sudo
2014
@@ -26,4 +20,5 @@ if [ -d ${INSTALL_PREFIX}/etc/env.d ]; then
2620else
2721 # installing without chromebrew, append the autostart script to bashrc
2822 echo " source ${INSTALL_PREFIX} /lib/crew-sudo/autostart/crew-sudo.sh" >> ~ /.bashrc
23+ echo -e ' \e[1;32m' ' crew-sudo installed!' ' \e[0m'
2924fi
You can’t perform that action at this time.
0 commit comments