# HG changeset patch # User Christopher Rogers # Date 1350327180 0 # Node ID 6ff62c90dd29ba40943aa7fc9695bd8193a0298f # Parent 3974b72eb580eeba0edcc9aa863bdb7a256b7cc0 cook: Add some comments to better explain my functions. diff -r 3974b72eb580 -r 6ff62c90dd29 cook --- a/cook Mon Oct 15 17:39:00 2012 +0000 +++ b/cook Mon Oct 15 18:53:00 2012 +0000 @@ -265,6 +265,8 @@ done } +# get source tarball +# $1 = --extract getsrc() { gettext "Getting source for:"; echo " $pkg" set_paths @@ -312,6 +314,9 @@ [ "$PATCH" ] && echo -e "Patch: $SRC/$PTARBALL" } +# the base function to download sources when offline +# This is to make sure source can be download when local-mirror +# script is in use. download_base() { local URLS url alt_url orig_url orig_url_patch url="$ONLINE_SRC_REPOSITORY" @@ -391,6 +396,9 @@ chown -R 0.0 $(pwd) } +# Repack source tarball as .tar.lzma +# The source tarball is extracted as $tmpsrc/$pkgsrc path +# This way the source has a clean path when building repack_source() { # Some archives are not well done and don't extract to one dir (ex lzma). @@ -584,6 +592,8 @@ fi } +# extract path of source tarball +# This is for the getsrc --extract option extract_path() { # Some archives are not well done and don't extract to one dir (ex lzma). @@ -1007,6 +1017,7 @@ sed '1!G;h;$!d' $1 } +# this function is to build the unbuild list unbuild() { check_root