Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:frispete:tools
ampache
get-source.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File get-source.sh of Package ampache
#!/bin/bash # function usage (){ echo echo "Usage: $0 [options]" echo " -f : force update" echo " -m : try to update the ampache package" echo " -i : install needed composer" echo exit 0 } while getopts 'himf' OPTION ; do case $OPTION in f) FORCE="yes" ;; h) usage ;; i) COMPOSER="yes" ;; m) AMPACHE="yes" ;; esac done shift $(( OPTIND - 1 )) if [ -f ampache.spec ]; then AMPACHEVERSION=`grep ^Version: ampache.spec | awk '" " { print $2 }'` AMPACHESOURCE=`grep ^Source: ampache.spec | awk '" " { print $2 }' | sed 's|%{version}|'$AMPACHEVERSION'|g' | sed 's|%{name}|ampache|g'` echo "Ampache Version: $AMPACHEVERSION" echo "Ampache Source: $AMPACHESOURCE" echo "" else echo "Couldn't find ampache.spec" echo "" exit 1 fi if [ "$COMPOSER" == "yes" ]; then echo "First we need to install reuired packages: composer, php8-intl, php8-gettext and npm20..." sudo zypper in php-composer2 php8-intl php8-gettext npm20 exit 1 fi if [ "$FORCE" = yes ]; then rm ampache-$AMPACHEVERSION.tar.gz rm ampache-$AMPACHEVERSION-vendor.tar.gz wget -4 --no-clobber --continue ${AMPACHESOURCE} tar -xvzf ampache-$AMPACHEVERSION.tar.gz fi if [ "$AMPACHE" == "yes" ]; then if [ -f ampache-$AMPACHEVERSION.tar.gz ] ; then echo "Warning: file ampache exists - exiting" exit 1 else wget -4 --no-clobber --continue ${AMPACHESOURCE} tar -xvzf ampache-$AMPACHEVERSION.tar.gz fi fi echo "Download components and vendor..." cd ampache-$AMPACHEVERSION ##echo "First we need copy composer_old.json to composer.json because composer.json supports only php 8.2..." ##cp -f ./composer_old.json ./composer.json echo "Now download/install..." composer install --no-dev --prefer-source --no-interaction for f in `find . -type d | grep "/.git"`; do rm -rf $f done for f in `find . -type d | grep "/.gitignore"`; do rm -rf $f done for f in `find . -type f | grep "/.gitignore"`; do rm -rf $f done for f in `find . -type f | grep "/.gitattributes"`; do rm -rf $f done cd .. echo "install required npm modules amd build npm..." cd ampache-$AMPACHEVERSION echo "First we will install vite, npm-run-all and copyfiles with install -g ..." sudo npm install -g vite sudo npm install -g npm-run-all sudo npm install -g copyfiles echo "Now run 'npm install..." npm install echo "Now run 'npm install build..." npm run build cd .. echo "Packaging..." tar -czf ampache-$AMPACHEVERSION-vendor.tar.gz ampache-$AMPACHEVERSION/public/lib/components ampache-$AMPACHEVERSION/vendor tar -czf ampache-$AMPACHEVERSION-node_modules.tar.gz ampache-$AMPACHEVERSION/node_modules ampache-$AMPACHEVERSION/public/dist ampache-$AMPACHEVERSION/resources/images/material-symbols rm -rf ampache-$AMPACHEVERSION echo "Done..." exit
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