Check for Erlang before proceeding
This commit is contained in:
parent
f35cde997e
commit
2bea70c48d
22
install
22
install
@ -6,6 +6,15 @@ bin="$HOME"/bin
|
||||
cd "$(dirname $(realpath $0))"
|
||||
chmod +x uninstall
|
||||
|
||||
if erl=$(command -v erl)
|
||||
then
|
||||
echo "Erlang found at $erl"
|
||||
else
|
||||
echo "Could not find an Erlang installation!"
|
||||
echo "Erlang must be installed and available in \$PATH to proceed."
|
||||
exit 95
|
||||
fi
|
||||
|
||||
if [ -d "$zomp_dir" ]
|
||||
then
|
||||
echo "Installation directory $zomp_dir already exists. Aborting."
|
||||
@ -28,12 +37,17 @@ fi
|
||||
|
||||
for rc in "$HOME/.profile" "$HOME/.bashrc" "$HOME/.bash_profile"
|
||||
do
|
||||
if grep -q "PATH=\"\$HOME/bin:\$PATH\"" "$rc"
|
||||
if [ -f "$rc" ]
|
||||
then
|
||||
echo "Path adjustment found in $rc."
|
||||
if grep -q "PATH=\"\$HOME/bin:\$PATH\"" "$rc"
|
||||
then
|
||||
echo "Path adjustment found in $rc."
|
||||
else
|
||||
echo "Path adjustment not found in $rc. Adding it."
|
||||
echo "export PATH=\"\$HOME/bin:\$PATH\"" >> "$rc"
|
||||
fi
|
||||
else
|
||||
echo "Path adjustment not found in $rc. Adding it."
|
||||
echo "export PATH=\"\$HOME/bin:\$PATH\"" >> "$rc"
|
||||
echo "No $rc is present. Skipping."
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
BIN
zx-0.9.1.tar.gz
Normal file
BIN
zx-0.9.1.tar.gz
Normal file
Binary file not shown.
BIN
zx-0.9.1.tar.xz
Normal file
BIN
zx-0.9.1.tar.xz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user