diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2013-04-19 11:58:05 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2013-04-19 11:58:05 +0200 |
commit | eef56edc310a699ac88037d24a0fda0ffb798ce7 (patch) | |
tree | 9633fd3afddeab5958b8453ef364afd444d7c6af /efl-release-build.sh | |
parent | 353457158d7d298a10b5de241daa2b5296d551d3 (diff) | |
download | bin-eef56edc310a699ac88037d24a0fda0ffb798ce7.zip bin-eef56edc310a699ac88037d24a0fda0ffb798ce7.tar.gz |
efl-release-build.sh: support minor release
Diffstat (limited to 'efl-release-build.sh')
-rwxr-xr-x | efl-release-build.sh | 50 |
1 files changed, 37 insertions, 13 deletions
diff --git a/efl-release-build.sh b/efl-release-build.sh index 472c9e1..84c25e2 100755 --- a/efl-release-build.sh +++ b/efl-release-build.sh @@ -2,8 +2,9 @@ SUDO_PASSWD="" +EFL_MINOR=1 EFL_VER=1.7.6 -E_VER=0.17.2 +E_VER=0.17.2.1 BASE_URL="http://download.enlightenment.fr/releases" DBUS_SRV_PATH="/usr/share/dbus-1/services" @@ -23,37 +24,59 @@ E_FLAGS+=" --sysconfdir=/etc" EFL_PKGS="eina eet evas ecore eio embryo edje efreet e_dbus eeze emotion ethumb elementary" -function e_get() { +function get_and_clean() +{ + _arch=$1 + echo " - $_arch" + [ -f $_arch ] || curl -L "$BASE_URL/$_arch" -o $_arch + [ $(file -ib $_arch | cut -f 1 -d ' ' | grep text) ] && rm $_arch +} + +function e_get() +{ echo "fetch archives" for pkg in $EFL_PKGS; do + arch_minor=${pkg}-${EFL_VER}.${EFL_MINOR}.tar.bz2 arch=${pkg}-${EFL_VER}.tar.bz2 - echo " - $arch" - [ -f $arch ] || curl -L "$BASE_URL/$arch" -o $arch || exit 1 + [ -e $arch -a -e $arch_minor ] && rm ${pkg}-${EFL_VER}.*.bz2 + [ -e $arch -o -e $arch_minor ] && continue + get_and_clean $arch_minor + [ -e $arch_minor ] && continue + get_and_clean $arch + [ -e $arch ] || exit 1 done e_arch=enlightenment-${E_VER}.tar.bz2 + [ -f $e_arch ] && return echo " - $e_arch" - [ -f $e_arch ] || curl -L "$BASE_URL/$e_arch" -o $e_arch || exit 1 + curl -L "$BASE_URL/$e_arch" -o $e_arch || exit 1 } -function e_extract() { +function e_extract() +{ echo "extract archives" for pkg in $EFL_PKGS; do - echo " - $arch" - [ -d $pkg-${EFL_VER} ] && rm -rf $pkg-${EFL_VER} + echo " - $pkg" + rm -rf $pkg-${EFL_VER}.${MINOR}*[^bz2] 2>/dev/null + arch_minor=${pkg}-${EFL_VER}.${EFL_MINOR}.tar.bz2 arch=${pkg}-${EFL_VER}.tar.bz2 - tar -xjf $arch || exit 1 + if [ -e $arch_minor ]; then + tar -xjf $arch_minor|| exit 1 + elif [ -e $arch ]; then + tar -xjf $arch || exit 1 + fi done echo " - $e_arch" - [ -d enlightenment-${E_VER} ] && rm -rf enlightenment-${E_VER} + rm -rf enlightenment-*[^bz2] 2>/dev/null e_arch=enlightenment-${E_VER}.tar.bz2 tar -xjf $e_arch || exit 1 } -function e_build() { +function e_build() +{ echo "build and install" for pkg in $EFL_PKGS; do echo " - $pkg" - cd $pkg-${EFL_VER} || exit 1 + cd $pkg-${EFL_VER}.${MINOR} 2>/dev/null || cd $pkg-${EFL_VER} 2>/dev/null ./autogen.sh --prefix=$PREFIX $EFL_FLAGS if [ $? -ne 0 ]; then echo " - FIX configure.ac" && sed -i 's/AM_PROG_CC_STDC/AC_PROG_CC/g' configure.ac && sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || exit 1 @@ -70,7 +93,8 @@ function e_build() { } -function get_sudopwd() { +function get_sudopwd() +{ sudo_test=/tmp/_sudo.test echo -n "enter sudo-password: " && stty -echo && read SUDO_PASSWD && stty echo || exit 1 [ -e $sudo_test ] && rm -f $sudo_test |