diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2011-05-24 11:24:41 +0300 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2011-05-24 11:24:41 +0300 |
commit | b5f2698f5f7bea646d430d931079d42710c5fa7b (patch) | |
tree | 43c7e7cce7e0ea7ccc7f5ea5798a5f453b12c5e0 /build-scripts/helpers | |
parent | 710b12a1650f414914800d25b154c22b85578d88 (diff) |
Move functions to common include file.
Diffstat (limited to 'build-scripts/helpers')
-rw-r--r-- | build-scripts/helpers | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/build-scripts/helpers b/build-scripts/helpers index 2c13bb1..38ef3c1 100644 --- a/build-scripts/helpers +++ b/build-scripts/helpers @@ -26,3 +26,16 @@ calc_make_jobs () { MAKE_JOBS=$(($cpuc * 4)) fi } + +function get_url_basename { + echo "$1" | sed -e 's/^.*\/\([^/]*\)$/\1/' +} + +function get_tarball_version { +# echo "$1" | sed -e 's/^.*-//' -e 's/\.tar.*$//' + echo "$1" | sed -r -e 's/\.tar.*$//' -e 's/^[a-z0-9]+-(.*)/\1/' +} +#echo `get_version gcc-linaro-4.5-2011.04-0.tar.bz2` +# linaro-4.5-2011.04-0 +#echo `get_version binutils-2.20.1.tar.bz2` +# 2.20.1 |