Skip to content

Commit a8a2b9b

Browse files
committed
Fix installer logic
1 parent 3dd3531 commit a8a2b9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ cp -r . ${INSTALL_PREFIX}/lib/crew-sudo
1212
ln -sf ../lib/crew-sudo/crew-sudo ${INSTALL_PREFIX}/bin/crew-sudo
1313
ln -sf ../lib/crew-sudo/crew-sudo ${INSTALL_PREFIX}/bin/sudo
1414

15-
if [ -d ${INSTALL_PREFIX}/etc/env.d ]; then
15+
if [ -n "${CREW_DEST_PREFIX}" ]; then
1616
# installing under chromebrew
1717
mkdir -p ${INSTALL_PREFIX}/etc/{env.d,bash.d}
1818
ln -sf ../lib/crew-sudo/autostart/crew-sudo.sh ${INSTALL_PREFIX}/etc/env.d/crew_sudo
1919
ln -sf ../lib/crew-sudo/autocomplete/crew-sudo.sh ${INSTALL_PREFIX}/etc/bash.d/crew_sudo
2020
else
2121
# installing without chromebrew, append the autostart script to bashrc
22-
echo "source ${INSTALL_PREFIX}/lib/crew-sudo/autostart/crew-sudo.sh" >> ~/.bashrc
22+
echo -e '\n'"source ${INSTALL_PREFIX}/lib/crew-sudo/autostart/crew-sudo.sh" >> ~/.bashrc
2323
echo -e '\e[1;32m''crew-sudo installed!''\e[0m'
2424
fi

0 commit comments

Comments
 (0)