Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Education
moodle3_6
get_sources.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File get_sources.sh of Package moodle3_6
#!/bin/bash # # get_sources.sh - update the *.zip files VERSION="3.6" FORCE="no" SHOW="no" MOODLE="no" VERSIONNAME=$(echo ${VERSION/./_}) function usage (){ echo echo "Usage: $0 [options]" echo " -f : force update" echo " -m : try to update the moodle package" echo " -s : show only current sources in specfile" echo exit 0 } while getopts 'hmfs' OPTION ; do case $OPTION in f) FORCE="yes" ;; h) usage ;; m) MOODLE="yes" ;; s) SHOW="yes" ;; esac done shift $(( OPTIND - 1 )) if [ -f moodle${VERSIONNAME}.spec ]; then MOODLEVERSION=`grep ^Version: moodle${VERSIONNAME}.spec | awk '" " { print $2 }'` MOODLEDIR=${MOODLEVERSION/./} else echo "Couldn't find moodle${VERSIONNAME}.spec" exit 1 fi if [ "$SHOW" == "yes" ] ; then z=10; for i in `ls *.zip `; do echo "Source1${z}: `basename $i`"; z=$((z+1)); done exit fi for i in `grep Source1[0-9][0-9] moodle${VERSIONNAME}.spec | awk '" " { print $2 }'`; do if [ "$FORCE" = yes ]; then rm $i fi # https://download.moodle.org/langpack/3.6/ wget -4 --no-clobber --continue https://download.moodle.org/langpack/${VERSION}/${i} done if [ "$MOODLE" == "yes" ]; then MOODLEDIR=${VERSION/./} wget -4 --no-clobber --continue https://download.moodle.org/stable${MOODLEDIR}/moodle-$MOODLEVERSION.tgz if [ -d moodle ] ; then echo "Warning: directory moodle exists - exiting" exit 1 fi tar -xzf moodle-$MOODLEVERSION.tgz tar -cjf moodle-$MOODLEVERSION.tar.bz2 moodle rm -r moodle rm moodle-$MOODLEVERSION.tgz fi
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor