Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:13.2:NonFree:Update
flash-player.6063
update.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File update.sh of Package flash-player.6063
#!/bin/bash # vim: sw=4 et # If you want to update more than one repository at once, set # FLASH_PLAYER_UPDATE_COMMON_DESC variable to a place in writable # directory. If the file exists, it will be used, otherwise it will be # created. if test -n "$FLASH_PLAYER_UPDATE_COMMON_DESC" ; then if test -f "$FLASH_PLAYER_UPDATE_COMMON_DESC" ; then . $FLASH_PLAYER_UPDATE_COMMON_DESC else echo -n >$FLASH_PLAYER_UPDATE_COMMON_DESC fi fi function cache_set() { if test -n "$FLASH_PLAYER_UPDATE_COMMON_DESC" ; then echo >>$FLASH_PLAYER_UPDATE_COMMON_DESC "$1=\"$2\"" fi } set -e if test -z "$UPDATE_EXISTS" ; then # Unknown status of UPDATE_EXISTS means no FLASH_PLAYER_UPDATE_COMMON_DESC t=$(mktemp -d XXXXXXX) mkdir ORIG_FLASH_SAVE mv *.tar.gz ORIG_FLASH_SAVE pushd $t &>/dev/null UPDATE_EXISTS=false tar xf ../ORIG_FLASH_SAVE/install_flash_player_11*_linux.i386.tar.gz libflashplayer.so md5sum libflashplayer.so > ORIG_FLASH rm libflashplayer.so # fetch the current download url download_url=$(curl -s 'https://get.adobe.com/flashplayer/download/?installer=FP_24.0_for_Linux_32-bit_(.tar.gz)_-_NPAPI&stype=3780&standalone=1' | egrep -o 'https*:\/\/fpdownload.adobe.com\/get\/flashplayer\/pdc\/24.*\/flash_player_npapi_linux.i386.tar.gz') echo "Trying download $download_url"; wget $download_url tar xf flash_player_npapi_linux.i386.tar.gz libflashplayer.so md5sum libflashplayer.so > NEW_FLASH if cmp -s ORIG_FLASH NEW_FLASH; then echo "no new update available" else echo "*** NEW flashplugin UPDATE AVAILABLE!" VERSION=$(strings libflashplayer.so | grep "LNX 24," | cut -d' ' -f2 | sed -e 's#,#.#g') echo "new version is $VERSION" download_url=$(echo $download_url | sed -e 's,i386,ARCH,') for arch in i386 x86_64; do wget -q $(echo $download_url | sed -e "s,ARCH,$arch,") mv flash_player_npapi_linux.$arch.tar.gz flash_player_npapi_${VERSION}_linux.$arch.tar.gz mv flash_player_npapi_${VERSION}_linux.$arch.tar.gz .. cache_set UPDATE_EXISTS "true" cache_set VERSION "$VERSION" cache_set INSTALL_FLASH_PLAYER_FILENAME_$arch flash_player_npapi_${VERSION}_linux.$arch.tar.gz done UPDATE_EXISTS=true fi cd .. popd &>/dev/null rm -rf $t cache_set FLASH_PLAYER_DIRNAME $PWD if $UPDATE_EXISTS ; then rm -r ORIG_FLASH_SAVE else cache_set UPDATE_EXISTS false mv ORIG_FLASH_SAVE/* . rmdir ORIG_FLASH_SAVE exit 2 fi # Create changelog entry. echo -n "Please enter BSC# (number only${BSC:+, press Enter for \"$BSC\"}): " read BSC if test -z "$BSC" ; then echo >&2 "BSC is empty!" exit 1 fi cache_set BSC "$BSC" echo -n "Please enter Adobe Vulnerability identifier (including APSA/APSB): " read APSA if test -z "$APSA" ; then echo >&2 "APSA is empty!" fi cache_set APSA "$APSA" echo -n "Please enter list of CVE (\", \" separated): " read CVE if test -z "$CVE" ; then echo >&2 "CVE is empty!" exit 1 fi cache_set CVE "$CVE" osc vc -m "Security update to $VERSION (bsc#$BSC): * $(echo " $APSA, $CVE" | fmt -w 67 | tail -c +5)" else # Update was already done in another repository. if $UPDATE_EXISTS ; then # ./update.sh was already called in another directory. Reuse its output. rm *.tar.gz cp -a $FLASH_PLAYER_DIRNAME/$INSTALL_FLASH_PLAYER_FILENAME_i386 . cp -a $FLASH_PLAYER_DIRNAME/$INSTALL_FLASH_PLAYER_FILENAME_x86_64 . cp -a $FLASH_PLAYER_DIRNAME/$FLASH_PLAYER_FILENAME_i386 . sed -n '1p;1,/^-----/{/^-----/d;p}' <$FLASH_PLAYER_DIRNAME/flash-player.changes >flash-player.changes.add cat flash-player.changes.add flash-player.changes >flash-player.changes.new mv flash-player.changes.new flash-player.changes rm flash-player.changes.add else exit 2 fi fi sed -i -e "s,Version:.*,Version: $VERSION," flash-player.spec osc addremove echo "Done. Please call \"osc ci\"."
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