Sure, you can use $1 for a command line parameter, as such:
Code:
#!/bin/bash
ftp1="--ftp"
scp1="--scp"
if [ "$1" = "$ftp1" ]
then
cd $B_DIRECTORY && $LFTP -u $USER,$SECRET $FTP_SERVER -e "pget $PKGS ; exit"
elif [ "$1" = "$scp1" ]
then
$SCP "$USER"@"$SSH_SERVER":/"$R_DIRECTORY/$PKGS" ./"$B_DIRECTORY"
else
echo "Please use either --ftp or --scp"
fi
I don't know if this code will run right away, might need to be tweaked up.
Cheers,
Josh