Check for Erlang before proceeding
This commit is contained in:
parent
f35cde997e
commit
2bea70c48d
14
install
14
install
@ -6,6 +6,15 @@ bin="$HOME"/bin
|
|||||||
cd "$(dirname $(realpath $0))"
|
cd "$(dirname $(realpath $0))"
|
||||||
chmod +x uninstall
|
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" ]
|
if [ -d "$zomp_dir" ]
|
||||||
then
|
then
|
||||||
echo "Installation directory $zomp_dir already exists. Aborting."
|
echo "Installation directory $zomp_dir already exists. Aborting."
|
||||||
@ -28,6 +37,8 @@ fi
|
|||||||
|
|
||||||
for rc in "$HOME/.profile" "$HOME/.bashrc" "$HOME/.bash_profile"
|
for rc in "$HOME/.profile" "$HOME/.bashrc" "$HOME/.bash_profile"
|
||||||
do
|
do
|
||||||
|
if [ -f "$rc" ]
|
||||||
|
then
|
||||||
if grep -q "PATH=\"\$HOME/bin:\$PATH\"" "$rc"
|
if grep -q "PATH=\"\$HOME/bin:\$PATH\"" "$rc"
|
||||||
then
|
then
|
||||||
echo "Path adjustment found in $rc."
|
echo "Path adjustment found in $rc."
|
||||||
@ -35,6 +46,9 @@ for rc in "$HOME/.profile" "$HOME/.bashrc" "$HOME/.bash_profile"
|
|||||||
echo "Path adjustment not found in $rc. Adding it."
|
echo "Path adjustment not found in $rc. Adding it."
|
||||||
echo "export PATH=\"\$HOME/bin:\$PATH\"" >> "$rc"
|
echo "export PATH=\"\$HOME/bin:\$PATH\"" >> "$rc"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "No $rc is present. Skipping."
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
cp -r zomp "$zomp_dir"
|
cp -r zomp "$zomp_dir"
|
||||||
|
|||||||
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