Skip to content

Commit

Permalink
Updated scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sthiyaga committed Jun 22, 2014
1 parent 6ed2e99 commit 08e7a39
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
8 changes: 6 additions & 2 deletions bin/encrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@

JAVA=`which java`

$JAVA -cp dataloader-30.0.0-uber.jar com.salesforce.dataloader.security.EncryptionUtil "$@" | sed 's/^.*) \- //g'

if [ "$JAVA" == "" ]; then
echo "Unable to find Java Runtime in PATH";
exit -1;
else
$JAVA -cp dataloader-30.0.0-uber.jar com.salesforce.dataloader.security.EncryptionUtil "$@" | sed 's/^.*) \- //g'
fi
26 changes: 23 additions & 3 deletions bin/process.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
#/bin/sh

if [ "$#" -lt 1 ]; then
echo "Usage: $0 <process-name>" >&2
exit 1
echo "Usage: $0 [conf-dir] <process-name>" >&2
echo "Default conf-dir is ./conf"
exit -1
elif [ "$#" -eq 2 ] && [ ! -d $1 ]; then
echo "Usage: $0 [conf-dir] <process-name>" >&2
echo "$1: not a valid directory path"
echo "Default conf-dir is ./conf"
exit -1
fi

CONF_DIR="conf"
PROCESS=""
if [ "$#" -eq 1 ]; then
PROCESS="$1"
elif [ "$#" -eq 2 ]; then
CONF_DIR="$1"
PROCESS="$2"
fi

JAVA=`which java`

$JAVA -cp dataloader-30.0.0-uber.jar -Dsalesforce.config.dir=conf com.salesforce.dataloader.process.ProcessRunner process.name=$1
if [ "$JAVA" == "" ]; then
echo "Unable to find Java Runtime in PATH"
exit -1
else
$JAVA -cp dataloader-30.0.0-uber.jar -Dsalesforce.config.dir=$CONF_DIR com.salesforce.dataloader.process.ProcessRunner process.name=$PROCESS
fi

0 comments on commit 08e7a39

Please sign in to comment.