File update_dcraw of Package dcraw.23716

#! /bin/sh

# Call this script to update dcraw files to latest version.
# "wget", "rcs" and "lynx" packages are required for the update

wget -N https://www.dechifro.org/dcraw/parse.c
wget -N https://www.dechifro.org/dcraw/fujiturn.c
wget -N https://www.dechifro.org/dcraw/rawphoto.c
wget -N https://www.dechifro.org/dcraw/clean_crw.c
wget -N https://www.dechifro.org/dcraw/fuji_green.c
mv badpixels .badpixels
wget -N https://www.dechifro.org/dcraw/.badpixels
mv .badpixels badpixels
( URL="https://www.dechifro.org/dcraw/" ; echo -e "$URL:\n" ; LC_ALL=C lynx -display_charset=utf-8 -dump "$URL" | sed '1d;3,4d' ) >README
OLDVERSION=`sed -ne 's/^Version:[[:space:]]*\([0-9.]\+\)[[:space:]]*$/\1/p' dcraw.spec`
NEWVERSION=`lynx -dump https://www.dechifro.org/dcraw/archive/ | sed -n -e 's/^.*dcraw-\([0-9.]\+\)\.tar\.gz.*$/\1/p' |sort -nr |head -1`
wget -N https://www.dechifro.org/dcraw/archive/dcraw-${NEWVERSION}.tar.gz
sed -i -e "s/^\(Version:[[:space:]]*\)[0-9.]\+[[:space:]]*$/\1${NEWVERSION}/" dcraw.spec
tar --strip-components=1 -xf dcraw-${OLDVERSION}.tar.gz dcraw/dcraw.c
rm dcraw-${OLDVERSION}.tar.gz
wget -N https://www.dechifro.org/dcraw/RCS/dcraw.c,v
rlog dcraw.c >dcraw.log
rm -f dcraw.c dcraw.c,v
wget -N https://www.dechifro.org/dcraw/RCS/parse.c,v
rlog parse.c >parse.log
rm parse.c,v
echo
echo "********************************************************************"
echo "********************************************************************"
echo "Please check, whether packaged file list is up to date."
echo "You can look at dcraw.log and parse.log for the complete change log."
echo "Before submit, please call:"
echo "rm dcraw.log parse.log"
openSUSE Build Service is sponsored by