Skip to content

Commit d94b4cd

Browse files
authored
Merge pull request #12 from UncleGrumpy/fix_install_freebsd
Fix some small bugs in install.sh
2 parents a7b64ea + d7356c0 commit d94b4cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ set -e
4848
readonly root_dir="$(cd $(dirname $0) && pwd)"
4949

5050
readonly nargs=$#
51-
if [[ ${nargs} -lt 2 ]]; then
51+
if [ ${nargs} -lt 2 ]; then
5252
echo
5353
echo "Syntax: $0 <prefix> <version>"
5454
echo " where <prefix> is the prefix location for the install"
@@ -84,8 +84,8 @@ echo_run cp "${src_tar}" "${tmp_dir}/."
8484
echo_run gunzip "${tmp_dir}/atomvm_packbeam-${version}.tar.gz"
8585

8686
readonly dest_dir="${prefix}/atomvm_packbeam"
87-
if [ -e "${dest_dir}" ]; then
88-
echo "ERROR! It looks like ${dest_dir} already exists!"
87+
if [ $(${dest_dir}/bin/packbeam version) = ${version} ]; then
88+
echo "ERROR! It looks like ${version} is already installed!"
8989
exit 1
9090
fi
9191

0 commit comments

Comments
 (0)