diff options
author | rudson <rudson@370017ae-e619-0410-ac65-c121f96126d4> | 2006-12-02 23:09:35 +0000 |
---|---|---|
committer | rudson <rudson@370017ae-e619-0410-ac65-c121f96126d4> | 2006-12-02 23:09:35 +0000 |
commit | 7b435b9e24bdc4e027adb9fa66d2de0b58202e05 (patch) | |
tree | c90796a63e8d648a1725a3b95baaf4dc3fa5c689 | |
parent | 600d92de2f48e0755ccceb010f5233778c861063 (diff) | |
download | slackbuilds-7b435b9e24bdc4e027adb9fa66d2de0b58202e05.tar.gz slackbuilds-7b435b9e24bdc4e027adb9fa66d2de0b58202e05.tar.bz2 |
removendo echos dos slackbuilds e corrigindo chamadas de erros
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@747 370017ae-e619-0410-ac65-c121f96126d4
23 files changed, 180 insertions, 942 deletions
diff --git a/app/admin/hddtemp/hddtemp.SlackBuild b/app/admin/hddtemp/hddtemp.SlackBuild index d5cc593d..6a1bd6b0 100755 --- a/app/admin/hddtemp/hddtemp.SlackBuild +++ b/app/admin/hddtemp/hddtemp.SlackBuild @@ -48,24 +48,13 @@ URL=${URL:="http://www.guzu.net/files/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -91,11 +80,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -103,20 +89,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -126,12 +102,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ----------------- Stripa código ----------------------- cd $PKG @@ -168,14 +139,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{ABOUT-NLS,AUTHORS,COPYING,ChangeLog,GPL-2,INSTALL,LICENSE,NEWS,README,TODO} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/app/arch/cabextract/cabextract.SlackBuild b/app/arch/cabextract/cabextract.SlackBuild index 2c71377e..071cae74 100755 --- a/app/arch/cabextract/cabextract.SlackBuild +++ b/app/arch/cabextract/cabextract.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://www.kyz.uklinux.net/downloads/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,20 +88,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -125,12 +101,8 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL + # --------------- compacta manuais ---------------------- gzip -r $PKG/$PREFIX/man/* @@ -169,14 +141,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,README,TODO} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/app/cdr/k9copy/k9copy.SlackBuild b/app/cdr/k9copy/k9copy.SlackBuild index 1b611ba9..9a0a66e0 100755 --- a/app/cdr/k9copy/k9copy.SlackBuild +++ b/app/cdr/k9copy/k9copy.SlackBuild @@ -53,24 +53,13 @@ URL=${URL:="http://ufpr.dl.sourceforge.net/sourceforge/k9copy/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -96,11 +85,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -108,20 +94,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -131,12 +107,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ----------------- Stripa código ----------------------- cd $PKG @@ -174,14 +145,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,README,TODO} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/app/editors/kile/kile.SlackBuild b/app/editors/kile/kile.SlackBuild index f75551c5..59d24ca2 100755 --- a/app/editors/kile/kile.SlackBuild +++ b/app/editors/kile/kile.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://ufpr.dl.sourceforge.net/sourceforge/kile/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,20 +88,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -125,12 +101,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ----------------- Stripa código ----------------------- cd $PKG @@ -167,14 +138,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{API,COPYING,ChangeLog,DEFINES,HACKING,INSTALL,LICENSE,README,README.WINGTK,STYLEGUIDE,TODO,USAGE} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/app/emulation/kqemu/kqemu.SlackBuild b/app/emulation/kqemu/kqemu.SlackBuild index a6d266e4..c13f6160 100755 --- a/app/emulation/kqemu/kqemu.SlackBuild +++ b/app/emulation/kqemu/kqemu.SlackBuild @@ -56,24 +56,13 @@ SOURCE=$SRC_DIR/qemu/$SRC mkdir -p $SRC_DIR/qemu 2>/dev/null # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/qemu/" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/qemu/" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit $ERROR_MD5 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -99,11 +88,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC 2>/dev/null -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -111,20 +97,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit 0 -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -133,10 +109,6 @@ rm -rf $PKG mkdir -p $PKG # --------------- Instala programa ---------------------- -# #### Instalação de binários ##### -# Instala programa em diretório temporário -echo -e "\n\n\033[01;32m Install $PACKAGE in $PKG \n\033[m" - # Find module name if [ -f kqemu.ko ] ; then MODULE=kqemu.ko @@ -159,8 +131,6 @@ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs st # ---------------- Cria doinstall ---------------------- # Script de instalação mkdir $PKG/install - -echo -e "\n\n\033[01;32m doinst.sh \n\033[m" cat << EOF_DONINST > install/doinst.sh #!/bin/sh set +e @@ -219,14 +189,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{Changelog,LICENSE,README} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION"_"$KVERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION"_"$KVERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/app/emulation/qemu/qemu.SlackBuild b/app/emulation/qemu/qemu.SlackBuild index b0b6df9d..4a91431e 100755 --- a/app/emulation/qemu/qemu.SlackBuild +++ b/app/emulation/qemu/qemu.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://fabrice.bellard.free.fr/qemu/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE/" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE/" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit $ERROR_MD5 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,20 +88,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make all \n\033[m" -make -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -125,16 +101,11 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" make install prefix=$PKG/$PREFIX \ bindir=$PKG/$PREFIX/bin \ mandir=$PKG/$PREFIX/man \ datadir=$PKG/$PREFIX/share/qemu \ - docdir=$PKG/$PREFIX/doc/qemu-$VERSION -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi + docdir=$PKG/$PREFIX/doc/qemu-$VERSION || exit $ERROR_INSTALL # ------------------- gzip manuais ------------------------ gzip -r $PKG/$PREFIX/man/* @@ -175,14 +146,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{COPYING,COPYING.LIB,Changelog,LICENSE,README,README.distrib,TODO,VERSION} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/app/emulation/wine/wine.SlackBuild b/app/emulation/wine/wine.SlackBuild index 6dffa03e..ec654530 100755 --- a/app/emulation/wine/wine.SlackBuild +++ b/app/emulation/wine/wine.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://ibiblio.org/pub/linux/system/emulators/wine/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,25 +88,11 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make depend -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi -make -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make depend || exit $ERROR_MAKE +make || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -130,12 +102,8 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL + # --------------- compacta manuais ---------------------- gzip $PKG/$PREFIX/share/man/man1/* @@ -176,14 +144,9 @@ mkdir -p $PKG_DOC/documentation/ cp $PKG_DIR/documentation/* $PKG_DOC/documentation/ # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/app/office/broffice/broffice.SlackBuild b/app/office/broffice/broffice.SlackBuild index 3ef76129..72b9f3ee 100755 --- a/app/office/broffice/broffice.SlackBuild +++ b/app/office/broffice/broffice.SlackBuild @@ -48,24 +48,13 @@ SOURCE=$SRC_DIR/$PACKAGE/$SRC mkdir -p $SRC_DIR/$PACKAGE 2>/dev/null # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit $ERROR_MD5 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # -------------- Desempacota fontes --------------------- @@ -74,28 +63,22 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC" cd $PKG_DIR/RPMS # Converte pacotes rpm para tgz -echo -e "\n\n\033[01;32m Converte rpm packages \n\033[m" ALLPKGS=$( ls *.rpm | wc -l ) j=1 for i in *.rpm; do - echo -e "\033[01;33m [$j of $ALLPKGS] Convert $i...\033[m" rpm2tgz $i let j++ done rm *.rpm 2>/dev/null # Converte links do KDE cd desktop-integration -echo -e "\033[01;33m Convert broffice.org-suse-menus...\033[m" rpm2tgz broffice.org-suse-menus*.rpm rm *.rpm *.deb 2>/dev/null @@ -105,14 +88,11 @@ rm -rf $PKG 2>/dev/null mkdir -p $PKG # Instala arquivos em $PKG_VERSION -echo -e "\n\n\033[01;32m Install packages \n\033[m" -echo -e "\033[01;33m Install broffice.org-suse-menus...\033[m" -tar xvf $( ls *.tgz ) -C $PKG +tar xvf $( ls *.tgz ) -C $PKG || exit $ERROR_TAR cd .. j=1 for i in *.tgz; do - echo -e "\033[01;33m [$j of $ALLPKGS] Install $i...\033[m" - tar xvf $i -C $PKG + tar xvf $i -C $PKG || exit $ERROR_TAR rm $i let j++ done @@ -182,14 +162,9 @@ cp $PKG_SRC/licenses/* $PKG_DOC cp $PKG_SRC/readmes/* $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/dev/tex/latex2html/latex2html.SlackBuild b/dev/tex/latex2html/latex2html.SlackBuild index c62140c3..27cdf623 100755 --- a/dev/tex/latex2html/latex2html.SlackBuild +++ b/dev/tex/latex2html/latex2html.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://saftsack.fs.uni-bayreuth.de/~latex2ht/current/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,20 +88,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -126,12 +102,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário [ ! -e /usr/share/texmf/tex/latex/html ] && REMOVE=1 || REMOVE=0 -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # --------------- Algumas correções --------------------- mkdir -p $PKG/usr/share/lib/latex2html @@ -178,14 +149,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{BUGS,Changes,FAQ,INSTALL,LICENSE,MANIFEST,README,TODO,readme.hthtml} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/dev/util/ddd/ddd.SlackBuild b/dev/util/ddd/ddd.SlackBuild index 4c050ee9..3dcd24f4 100644 --- a/dev/util/ddd/ddd.SlackBuild +++ b/dev/util/ddd/ddd.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://ftp.gnu.org/gnu/ddd/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,20 +88,11 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -126,11 +103,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ------------------- gzip manuais ------------------------ gzip -r $PKG/$PREFIX/man/* @@ -170,14 +143,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{AUTHORS,COPYING,COPYING.DOC,COPYING.LIB,CREDITS,INSTALL,NEWS,PROBLEMS,README,TIPS,TODO} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/media/gfx/digikam/digikam.SlackBuild b/media/gfx/digikam/digikam.SlackBuild index 1e0c4fa0..00d74dbd 100755 --- a/media/gfx/digikam/digikam.SlackBuild +++ b/media/gfx/digikam/digikam.SlackBuild @@ -53,24 +53,13 @@ URL=${URL:="http://ufpr.dl.sourceforge.net/sourceforge/digikam/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -96,11 +85,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -108,20 +94,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -131,12 +107,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ----------------- Stripa código ----------------------- cd $PKG @@ -173,14 +144,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{AUTHORS,COPYING,ChangeLog,HACKING,INSTALL,NEWS,README,RELEASE.rev,TODO} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/media/gfx/exiv2/exiv2.SlackBuild b/media/gfx/exiv2/exiv2.SlackBuild index 0f41c996..6f563b85 100755 --- a/media/gfx/exiv2/exiv2.SlackBuild +++ b/media/gfx/exiv2/exiv2.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://www.exiv2.org/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,20 +88,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -125,12 +101,8 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL + # --------------- Compacta manuais ---------------------- gzip -r $PKG/shared/man/* @@ -171,13 +143,9 @@ cp -r $PKG_DIR/doc $PKG_DOC # --------------- Constroi o pacote --------------------- echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/media/libs/libdvdcss/libdvdcss.SlackBuild b/media/libs/libdvdcss/libdvdcss.SlackBuild index ec4a9721..bcfa9af4 100755 --- a/media/libs/libdvdcss/libdvdcss.SlackBuild +++ b/media/libs/libdvdcss/libdvdcss.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://download.videolan.org/pub/libdvdcss/$VERSION/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,20 +88,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -125,12 +101,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ----------------- Stripa código ----------------------- cd $PKG @@ -169,14 +140,9 @@ mkdir $PKG_DOC/html cp $PKG_DIR/doc/html/* $PKG_DOC/html/ # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/media/libs/libdvdplay/libdvdplay.SlackBuild b/media/libs/libdvdplay/libdvdplay.SlackBuild index 4a90f98a..f0e2143e 100755 --- a/media/libs/libdvdplay/libdvdplay.SlackBuild +++ b/media/libs/libdvdplay/libdvdplay.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://download.videolan.org/pub/libdvdplay/$VERSION/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,20 +88,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -125,12 +101,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ----------------- Stripa código ----------------------- cd $PKG @@ -167,11 +138,7 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,README,THANKS,TODO} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then diff --git a/media/libs/libdvdread/libdvdread.SlackBuild b/media/libs/libdvdread/libdvdread.SlackBuild index 45ae433f..741f85b2 100755 --- a/media/libs/libdvdread/libdvdread.SlackBuild +++ b/media/libs/libdvdread/libdvdread.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://freshmeat.net/redir/libdvdread/17926/url_tgz/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,20 +88,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF --with-libdvdcss -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF --with-libdvdcss || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -125,12 +101,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ----------------- Stripa código ----------------------- cd $PKG @@ -167,11 +138,7 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,README,TODO} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then diff --git a/media/libs/libkexif/libkexif.SlackBuild b/media/libs/libkexif/libkexif.SlackBuild index b81c91c7..6a16bf79 100644 --- a/media/libs/libkexif/libkexif.SlackBuild +++ b/media/libs/libkexif/libkexif.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://ufpr.dl.sourceforge.net/sourceforge/kipi/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,21 +88,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" - -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX $OPTCONF --libdir=$LIBDIR -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX $OPTCONF --libdir=$LIBDIR || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -126,12 +101,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ----------------- Stripa código ----------------------- cd $PKG @@ -168,14 +138,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,PACKAGING,README,RELEASE.rev} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/media/libs/libkipi/libkipi.SlackBuild b/media/libs/libkipi/libkipi.SlackBuild index 46c57efc..855a7cf6 100755 --- a/media/libs/libkipi/libkipi.SlackBuild +++ b/media/libs/libkipi/libkipi.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://superb-west.dl.sourceforge.net/sourceforge/kipi/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,20 +88,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -125,12 +101,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ----------------- Stripa código ----------------------- cd $PKG @@ -167,14 +138,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,README,README.rev,TODO} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/media/sound/lame/lame.SlackBuild b/media/sound/lame/lame.SlackBuild index 2a062b77..d8e24b6d 100755 --- a/media/sound/lame/lame.SlackBuild +++ b/media/sound/lame/lame.SlackBuild @@ -54,24 +54,13 @@ URL=${URL:="http://ufpr.dl.sourceforge.net/sourceforge/lame/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE/" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE/" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit $ERROR_MD5 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -97,11 +86,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -109,20 +95,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make all \n\033[m" -make -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -132,12 +108,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ------------------- gzip manuais ------------------------ gzip -r $PKG/$PREFIX/man/* @@ -178,14 +149,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{API,COPYING,ChangeLog,DEFINES,HACKING,INSTALL,LICENSE,README,README.WINGTK,STYLEGUIDE,TODO,USAGE} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/media/video/dvdauthor/dvdauthor.SlackBuild b/media/video/dvdauthor/dvdauthor.SlackBuild index 7e002d6a..4105308d 100755 --- a/media/video/dvdauthor/dvdauthor.SlackBuild +++ b/media/video/dvdauthor/dvdauthor.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://superb-west.dl.sourceforge.net/sourceforge/dvdauthor/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,11 +79,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -102,20 +88,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -125,12 +101,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ------------------- gzip manuais ------------------------ gzip -r $PKG/$PREFIX/man/* @@ -170,14 +141,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,README,TODO} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/media/video/vamps/vamps.SlackBuild b/media/video/vamps/vamps.SlackBuild index 753ca226..77b139df 100755 --- a/media/video/vamps/vamps.SlackBuild +++ b/media/video/vamps/vamps.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://ufpr.dl.sourceforge.net/sourceforge/vamps/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit 0 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -90,32 +79,15 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" cd $PKG_DIR -# -------------- Configura programa --------------------- -# Configura programa -#echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -#CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -#if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then -# echo -e "\n\n\033[01;31m Configure error \n\033[m" -# exit $ERROR_CONF -#fi - # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make -j3 \n\033[m" -make -j3 -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make -j3 || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -125,12 +97,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m PREFIX=SPKG/$PREFIX make install \n\033[m" -PREFIX=$PKG/$PREFIX make install -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +PREFIX=$PKG/$PREFIX make install || exit $ERROR_INSTALL # ----------------- Stripa código ----------------------- cd $PKG @@ -168,14 +135,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{COPYING,INSTALL} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/net/im/skype/skype.SlackBuild b/net/im/skype/skype.SlackBuild index b3d12d31..fe6eb5b1 100755 --- a/net/im/skype/skype.SlackBuild +++ b/net/im/skype/skype.SlackBuild @@ -47,24 +47,13 @@ URL=${URL:="http://www.skype.com/go/getskype-linux-static"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $SRC \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE/" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE/" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit $ERROR_MD5 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # -------------- Desempacota fontes --------------------- @@ -73,11 +62,7 @@ PKG=$TMP/$PACKAGE rm -rf $PKG 2>/dev/null mkdir -p $PKG/opt # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG/opt -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG/opt || exit $ERROR_TAR mkdir -p $PKG/usr/share/applications/ cd $PKG/opt/ @@ -137,14 +122,9 @@ mkdir -p $PKG_DOC cp $SKYPE_DIR/{LICENSE,README} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/sci/mathematics/scilab/scilab.SlackBuild b/sci/mathematics/scilab/scilab.SlackBuild index b55bc743..c834dc63 100755 --- a/sci/mathematics/scilab/scilab.SlackBuild +++ b/sci/mathematics/scilab/scilab.SlackBuild @@ -46,24 +46,13 @@ URL=${URL:="http://www.scilab.org/download/stable/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote em $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE/" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE/" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit $ERROR_MD5 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -89,11 +78,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -101,20 +87,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make all \n\033[m" -make all -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make all || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -124,7 +100,6 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m Install in $PKG \n\033[m" mkdir -p $PKG/$LIBDIR cp -pr $PKG_SRC/* $PKG/$LIBDIR/ rm -rf $PKG/$LIBDIR/$PACKAGE-$VERSION/Perl @@ -135,11 +110,6 @@ rm -rf $PKG/$LIBDIR/$PACKAGE-$VERSION/libs rm -rf $PKG/$LIBDIR/$PACKAGE-$VERSION/m4 rm -rf $PKG/$LIBDIR/$PACKAGE-$VERSION/ocaml -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi - # Refazendo links mkdir -p $PKG/$PREFIX/bin 2>/dev/null ln -s $LIBDIR/$PACKAGE-$VERSION/bin/intersci-n $PKG/$PREFIX/bin/intersci-n 2>/dev/null @@ -218,14 +188,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{ACKNOWLEDGEMENTS,CHANGES,README_Unix,README_Windows.txt,RELEASE_NOTES,Readme_Visual.txt,licence.txt,release_notes.txt} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" == "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi diff --git a/sci/visualization/grace/grace.SlackBuild b/sci/visualization/grace/grace.SlackBuild index acd7b75d..ff302c33 100755 --- a/sci/visualization/grace/grace.SlackBuild +++ b/sci/visualization/grace/grace.SlackBuild @@ -46,24 +46,13 @@ URL=${URL:="ftp://plasma-gate.weizmann.ac.il/pub/grace/src/grace5/$SRC"} SOURCE=$SRC_DIR/$PACKAGE/$SRC # Verifica existência do pacote $SRC em $SRC_DIR if [ ! -e $SOURCE ]; then - echo -e "\n\n\033[01;32m Download $PACKAGE \n\033[m" - wget "$URL" -P "$SRC_DIR/$PACKAGE/" - # Verifica se o - if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m No such source file in $URL\n\033[m" - exit $ERROR_WGET - fi + wget "$URL" -P "$SRC_DIR/$PACKAGE/" || exit $ERROR_WGET fi # ------------------ Checa md5sum ----------------------- if [ "$SRC_ORIG" = "$SRC" -o "$MD5" != "$MD5_ORIG" -a "$MD5" != "no" ]; then SUM=`md5sum $SOURCE | awk '{print $1}'` - if [ "$SUM" != "$MD5" ]; then - echo -e "\n\n\033[01;31m MD5SUM error: run Slackbuild again \n\033[m" - echo -e "\033[01;31m Remove $PACKAGE from $SRC_DIR and start Slackbuild again or use MD5=\"no\" \n\033[m" - exit $ERROR_MD5 - fi - echo -e "\n\n\033[01;32m Md5sum Ok \n\033[m" + [ "$SUM" != "$MD5" ] && exit $ERROR_MD5 fi # ----------------- ARCH e LIBDIR ----------------------- @@ -89,11 +78,8 @@ PKG_SRC=$TMP/$PACKAGE-source rm -rf $PKG_SRC 2>/dev/null mkdir -p $PKG_SRC # Desempacota $SOURCE em $TMP/$PACKAGE-source -tar xvf $SOURCE -C $PKG_SRC -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m $SOURCE file error \n\033[m" - exit $ERROR_TAR -fi +tar xvf $SOURCE -C $PKG_SRC || exit $ERROR_TAR + # Pega o nome do diretório das fontes independente de sua # estrutura (package-version...) PKG_DIR="$PKG_SRC/$( ls $PKG_SRC/ )" @@ -101,20 +87,10 @@ cd $PKG_DIR # -------------- Configura programa --------------------- # Configura programa -echo -e "\n\n\033[01;32m CFLAGS=\"$SLKCFLAGS\" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF \n\033[m" -CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF -if [ $? -ne 0 -o "$OPTCONF" = "--help" ]; then - echo -e "\n\n\033[01;31m Configure error \n\033[m" - exit $ERROR_CONF -fi +CFLAGS="$SLKCFLAGS" ./configure --prefix=$PREFIX --libdir=$LIBDIR $OPTCONF || exit $ERROR_CONF # ---------------- Compila programa --------------------- -echo -e "\n\n\033[01;32m make all \n\033[m" -make -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Build error \n\033[m" - exit $ERROR_MAKE -fi +make || exit $ERROR_MAKE # ------------- Diretório Temporário -------------------- # Cria diretório temporário para construção do pacote @@ -124,12 +100,7 @@ mkdir -p $PKG # --------------- Instala programa ---------------------- # Instala programa em diretório temporário -echo -e "\n\n\033[01;32m make install DESTDIR=$PKG \n\033[m" -make install DESTDIR=$PKG -if [ $? -ne 0 ]; then - echo -e "\n\n\033[01;31m Install error \n\033[m" - exit $ERROR_INSTALL -fi +make install DESTDIR=$PKG || exit $ERROR_INSTALL # ------------ Cria links e instala manuais ------------- # Links @@ -195,14 +166,9 @@ mkdir -p $PKG_DOC cp $PKG_DIR/{CHANGES,COPYRIGHT,ChangeLog,DEVELOPERS,LICENSE,README} $PKG_DOC # --------------- Constroi o pacote --------------------- -echo -e "\n\n\033[01;32m makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz \n\033[m" -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz -if [ $? -ne 0 ]; then - exit $ERROR_MKPKG -fi +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG # ----------- Remove arquivos temporários --------------- if [ "$CLEANUP" = "yes" ]; then - echo -e "\n\n\033[01;32m Remove files... \n\033[m" rm -rf $PKG $PKG_SRC fi |