[PLUG] rsync command line syntax needs fixing

Rich Shepard rshepard at appl-ecosys.com
Wed Nov 13 16:30:32 UTC 2019


I have a shell script to look for new package releases and download them so
I can upgrade installed packages.

The script, rsync_multilib_patches.sh:
-----------------------------------------
#!/bin/sh

VERSION=${VERSION:-14.2}
TOPDIR=${TOPDIR:-"/opt/AlienBob/14.2"}

echo "Syncing version multilib packages for '$VERSION' ..."

if [ ! -d ${TOPDIR} ]; then
   echo "Target directory ${TOPDIR}/multilib does not exist!"
   exit 1
fi

cd ${TOPDIR}

rsync --delete -HrlptD --progress
rsync:http://bear.alienbase.nl/mirrors/people/alien/multilib/${VERSION}/
${VERSION}
#echo ...done.
----------------------------------------

When the script runs this is the result:

# ./rsync_multilib_patches.sh Syncing version multilib packages for '14.2' ...
<snipped all rsync usage lines>
rsync error: syntax or usage error (code 1) at main.c(1644) [Receiver=3.1.3]
./rsync_multilib_patches.sh: line 16: 
rsync:http://bear.alienbase.nl/mirrors/people/alien/multilib/14.2/: No such 
file or directory
./rsync_multilib_patches.sh: line 17: 14.2: command not found

Yet, http://bear.alienbase.nl/mirrors/people/alien/multilib/14.2/ loads fine
in firefox. I'm not seeing the syntax error in the rsync: line. What have I
missed?

Regards,

Rich



More information about the PLUG mailing list