aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xkerl15
1 files changed, 11 insertions, 4 deletions
diff --git a/kerl b/kerl
index a7815dd..3781081 100755
--- a/kerl
+++ b/kerl
@@ -22,6 +22,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
+KERL_VERSION="1.1.1"
+
#Grep fix for mac pcre errors
GREP_OPTIONS=''
@@ -167,6 +169,7 @@ usage()
echo " status Print available builds and installations"
echo " prompt Print a string suitable for insertion in prompt"
echo " cleanup Remove compilation artifacts (use after installation)"
+ echo " version Print current version (current: $KERL_VERSION)"
exit 1
}
@@ -205,7 +208,7 @@ update_checksum_file()
then
return 0
else
- echo "Getting the checksum file from erlang.org..."
+ echo "Getting checksum file from erlang.org..."
curl -L -o "$KERL_DOWNLOAD_DIR/MD5" "$ERLANG_DOWNLOAD_URL/MD5" || exit 1
fi
}
@@ -967,16 +970,16 @@ list_add()
return 1
fi
done < "$KERL_BASE_DIR/otp_$1"
- echo "$2" >> "$KERL_BASE_DIR/otp_$1"
+ echo "$2" >> "$KERL_BASE_DIR/otp_$1" || exit 1
else
- echo "$2" > "$KERL_BASE_DIR/otp_$1"
+ echo "$2" > "$KERL_BASE_DIR/otp_$1" || exit 1
fi
}
list_remove()
{
if [ -f "$KERL_BASE_DIR/otp_$1" ]; then
- sed $SED_OPT -i -e "/^.*$2$/d" "$KERL_BASE_DIR/otp_$1"
+ sed $SED_OPT -i -e "/^.*$2$/d" "$KERL_BASE_DIR/otp_$1" || exit 1
fi
}
@@ -1215,6 +1218,10 @@ _END_PATCH
}
case "$1" in
+ version)
+ echo "$KERL_VERSION"
+ exit 0
+ ;;
build)
if [ "$2" = "git" ]; then
if [ $# -ne 5 ]; then