add check for deps packages and REBUILD var

Signed-off-by: Ryan P.C. McQuen <ryan.q@linux.com>
pull/1/head
Ryan P.C. McQuen 9 years ago
parent 5a81270508
commit de2dd59167

@ -27,11 +27,18 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# These need set here: # These need to be set here:
INST=1 INST=1
TMP=${TMP:-/tmp} TMP=${TMP:-/tmp}
ROOT=$(pwd) ROOT=$(pwd)
## Allow a rebuild of all dependencies,
## even if they are already installed.
##
## Run:
## REBUILD=yes ./build-deps.sh
REBUILD=${REBUILD:-no}
# Loop for all packages # Loop for all packages
for dir in \ for dir in \
Deps/GraphicsMagick \ Deps/GraphicsMagick \
@ -48,6 +55,7 @@ for dir in \
# Get the package name # Get the package name
package=$(echo $dir | cut -f2- -d /) package=$(echo $dir | cut -f2- -d /)
if [ -z "`find /var/log/packages/ -name *$package-*`" ] || [ "${REBUILD}" = "yes" ]; then
# Change to package directory # Change to package directory
cd $ROOT/$dir || exit 1 cd $ROOT/$dir || exit 1
@ -71,4 +79,7 @@ for dir in \
# back to original directory # back to original directory
cd $ROOT cd $ROOT
else
echo "$package already installed."
fi
done done

Loading…
Cancel
Save