Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing perl modules for Bugzilla when no internet access
#!/bin/sh
# Download locations
# http://www.bugzilla.org/docs/3.6/en/html/modules-manual-download.html
# http://www.bugzilla.org/docs/3.6/en/html/modules-manual-optional.html
LOGFILE=install_progress.txt
PROCESSED_FILES_DIR=processed_files
mkdir -p ${PROCESSED_FILES_DIR}
#for file in *.gz
for FILE in `ls *.tar.gz`; do
echo "Processing : $FILE..."
echo "Processing : $FILE..." >> ${LOGFILE}
FILENAME=${FILE%*.tar.gz}
# unzip and move
tar -xzvf $FILE >> ${LOGFILE}
mv $FILE ${PROCESSED_FILES_DIR}
# make and install
cd ${FILENAME}
#newer/older? perl modules that have "Build.PL" instead of "Makefile.PL"
MAKE=
if -e Makefile.PL; then
MAKE=make
perl Makefile.PL >> ../$LOGFILE
else
MAKE=./Buildperl Build.PL >> ../$LOGFILE
fi
#make
#make test
#make install
$MAKE >> ../$LOGFILE
$MAKE test >> ../$LOGFILE
$MAKE install >> ../$LOGFILE
cd ..
echo "Done : $FILE..." >> ${LOGFILE}
echo "********************" >> ${LOGFILE}
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment