Exit if directory change fails

This commit is contained in:
Bob Mottram 2018-03-12 10:08:47 +00:00
parent fb57a56435
commit 3b8ca656cc
1 changed files with 2 additions and 2 deletions

View File

@ -78,11 +78,11 @@ function image_install_elixir {
fi
{ echo '#!/bin/bash';
echo "cd $INSTALL_DIR";
echo "cd $INSTALL_DIR || exit 1";
echo "erlang_package=$erlang_package";
echo "wget https://packages.erlang-solutions.com/\$erlang_package";
echo "if [ ! -f \"\$INSTALL_DIR/\$erlang_package\" ]; then";
echo ' exit 1';
echo ' exit 2';
echo 'fi';
echo "dpkg -i \$erlang_package"; } > "$rootdir/usr/bin/install_elixir"
chmod +x "$rootdir/usr/bin/install_elixir"