diff options
author | Yurii Rashkovskii <[email protected]> | 2011-08-30 02:50:57 -0700 |
---|---|---|
committer | Yurii Rashkovskii <[email protected]> | 2011-08-30 02:50:57 -0700 |
commit | 5a69a5a707e119d20473a3642be997862618691a (patch) | |
tree | a9526595f9717c3bf358885f71a9a7a86d567c97 /kerl | |
parent | 3d835cf703ee4feef47c5b3175662e81ba703c9d (diff) | |
parent | 56b67f5a1a9812c0a0007f9eb5acd692ac3c1a40 (diff) | |
download | kerl-5a69a5a707e119d20473a3642be997862618691a.tar.gz kerl-5a69a5a707e119d20473a3642be997862618691a.tar.bz2 kerl-5a69a5a707e119d20473a3642be997862618691a.zip |
Merge pull request #8 from nox/install-manpages
Add automatic manpages installation
Diffstat (limited to 'kerl')
-rwxr-xr-x | kerl | 43 |
1 files changed, 28 insertions, 15 deletions
@@ -39,6 +39,7 @@ fi KERL_CONFIGURE_OPTIONS= KERL_DISABLE_AGNER= KERL_SASL_STARTUP= +KERL_INSTALL_MANPAGES= # ensure the base dir exsists mkdir -p "$KERL_BASE_DIR" @@ -285,21 +286,7 @@ do_build() assert_build_name_unused $2 FILENAME=otp_src_$1.tar.gz - if [ ! -f "$KERL_DOWNLOAD_DIR/$FILENAME" ]; then - echo "Downloading $FILENAME to $KERL_DOWNLOAD_DIR" - mkdir -p "$KERL_DOWNLOAD_DIR" - curl $ERLANG_DOWNLOAD_URL/$FILENAME > "$KERL_DOWNLOAD_DIR/$FILENAME" - update_checksum_file - fi - ensure_checksum_file - echo "Verifying archive checksum..." - SUM=`$MD5SUM "$KERL_DOWNLOAD_DIR/$FILENAME" | cut -d " " -f $MD5SUM_FIELD` - ORIG_SUM=`grep $FILENAME "$KERL_DOWNLOAD_DIR/MD5" | cut -d " " -f 2` - if [ "$SUM" != "$ORIG_SUM" ]; then - echo "Checksum error, check the files in $KERL_DOWNLOAD_DIR" - exit 1 - fi - echo "Checksum verified ($SUM)" + download "$FILENAME" mkdir -p "$KERL_BUILD_DIR/$2" if [ ! -d "$KERL_BUILD_DIR/$2/otp_src_$1" ]; then echo "Extracting source code" @@ -428,6 +415,13 @@ ACTIVATE done fi fi + if [ "$rel" != "git" -a -n "$KERL_INSTALL_MANPAGES" ]; then + echo "Fetching and installing manpages..." + FILENAME=otp_doc_man_$rel.tar.gz + download "$FILENAME" + echo "Extracting manpages" + cd "$absdir" && tar xfz "$KERL_DOWNLOAD_DIR/$FILENAME" + fi echo "You can activate this installation running the following command:" echo ". $absdir/activate" echo "Later on, you can leave the installation typing:" @@ -505,6 +499,25 @@ do_active() fi } +download() +{ + if [ ! -f "$KERL_DOWNLOAD_DIR/$1" ]; then + echo "Downloading $1 to $KERL_DOWNLOAD_DIR" + mkdir -p "$KERL_DOWNLOAD_DIR" + curl "$ERLANG_DOWNLOAD_URL/$1" > "$KERL_DOWNLOAD_DIR/$1" + update_checksum_file + fi + ensure_checksum_file + echo "Verifying archive checksum..." + SUM=`$MD5SUM "$KERL_DOWNLOAD_DIR/$1" | cut -d " " -f $MD5SUM_FIELD` + ORIG_SUM=`grep -F "$1" "$KERL_DOWNLOAD_DIR/MD5" | cut -d " " -f 2` + if [ "$SUM" != "$ORIG_SUM" ]; then + echo "Checksum error, check the files in $KERL_DOWNLOAD_DIR" + exit 1 + fi + echo "Checksum verified ($SUM)" +} + case "$1" in build) if [ "$2" = "git" ]; then |