Skip to content

Commit

Permalink
Check and show errors at shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
juliogonzalez committed Apr 25, 2015
1 parent 9394642 commit fc1bc72
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
7 changes: 7 additions & 0 deletions clean
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
#!/bin/bash
rm -rf BUILD BUILDROOT RPMS SRPMS SOURCES/*.gz
if [ $? -eq 0 ]; then
echo "Directory cleaned up."
exit 0
else
echo "There are errors. Check log!"
exit 1
fi
13 changes: 11 additions & 2 deletions fuse-rpm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
VERSION='2.8.5'
if [ ! -f "./SOURCES/fuse-${VERSION}.tar.gz" ]; then
wget "http://downloads.sourceforge.net/fuse/fuse-${VERSION}.tar.gz" -O "./SOURCES/fuse-${VERSION}.tar.gz"
if [ $? -ne 0 ]; then
echo "Could not download fuse-${VERSION}.tar.gz! Check log!"
exit 1
fi
fi
rpmbuild --define "_topdir `pwd`" -ba 'SPECS/fuse-vitki.spec'
echo Your packages are available at $PWD/RPMS

if [ $? -eq 0 ]; then
echo "Your packages are available at $PWD/RPMS."
exit 0
else
echo "There are errors. Check log!"
exit 1
fi
13 changes: 11 additions & 2 deletions s3fs-build-rpm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
VERSION='1.78'
if [ ! -f "./SOURCES/s3fs-fuse-${VERSION}.tar.gz" ]; then
wget "https://github.com/s3fs-fuse/s3fs-fuse/archive/v${VERSION}.tar.gz" -O "./SOURCES/s3fs-fuse-${VERSION}.tar.gz"
if [ $? -ne 0 ]; then
echo "Could not download fuse-${VERSION}.tar.gz! Check log!"
exit 1
fi
fi
rpmbuild --define "_topdir `pwd`" -ba 'SPECS/s3fs-fuse.spec'
echo Your packages are available at $PWD/RPMS

if [ $? -eq 0 ]; then
echo "Your packages are available at $PWD/RPMS."
exit 0
else
echo "There are errors. Check log!"
exit 1
fi

0 comments on commit fc1bc72

Please sign in to comment.