Menu

[545d79]: / scripts / graphicsmagick_snapshot_copy-local  Maximize  Restore  History

Download this file

75 lines (64 with data), 2.0 kB

#!/bin/sh
#
# Copy GraphicsMagick snapshot release files into a directory to make them available.
# Then use rsync to send them to SourceForge.
#
#
SNAPSHOT_DIRECTORY=/ftp/pub/GraphicsMagick/snapshots
RM='rm -f'
CP='cp'

#printf "ARGS: %s\n" "$@"

# Remove all existing snapshot archive files
printf "${RM} ${SNAPSHOT_DIRECTORY}/GraphicsMagick-*\n"
${RM} ${SNAPSHOT_DIRECTORY}/GraphicsMagick-*

for file in "$@" ; do

    source=${file}
    file_base=$(basename "${file}")
    destf=''

    case "${file_base}" in
        ChangeLog)
            destf="ChangeLog.txt"
            ;;
        Changelog.html)
            destf="ChangeLog.html"
            ;;
        *.rpm*)
            continue
            ;;
        *.tar.bz2*)
            continue
            ;;
        *.tar.gz*)
            continue
            ;;
        *.tar.lz*)
            continue
            ;;
        *.tar.zst*)
            continue
            ;;
        *-windows.7z*)
            continue
            ;;
        *)
            destf=${file_base}
            ;;
    esac

    dest="${SNAPSHOT_DIRECTORY}/${destf}"

    printf "${RM} ${dest}\n"
    ${RM} "${dest}"
    printf "${CP} ${source} ${dest}\n"
    ${CP} "${source}" "${dest}"

done

# Now use rsync to send to SourceForge frs.sourceforge.net:/home/pfs/project/g/gr/graphicsmagick/graphicsmagick-snapshots
printf "rsync ${SNAPSHOT_DIRECTORY}/ ...\n"
# -a == -rlptgoD
# -vrtc
# --bwlimit is in bytes rather than bits!  Requests are rounded up to units of 1024 bytes.
time rsync -vrtzc --delete --delete-after --bwlimit=34k --stats ${SNAPSHOT_DIRECTORY}/ bfriesen,graphicsmagick@frs.sourceforge.net:/home/pfs/project/g/gr/graphicsmagick/graphicsmagick-snapshots

# Update web pages at SourceForge
if [ -d "${SRCDIR}/www" ] ; then
    rsync --delete-after -rlptv --exclude={'*.rst','*.am','*.fig','*.dot','*~','*.tmp'} "${SRCDIR}/www/" bfriesen@web.sourceforge.net:/home/project-web/graphicsmagick/htdocs
else
    printf "SRCDIR not defined!\n"
fi
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.