PDA

View Full Version : quickro.sh - bash script to avoid launcher when it fails


Tigerious
06-01-2012, 11:30 PM
#!/bin/bash

REGNUM_DIR="/home/${USER}/regnum"
REGNUM_EXE_DIR="${REGNUM_DIR}/live"
REGNUM_EXE_FILE="game"

if [[ $1 == '' || $2 == '' ]];then
echo "Usage : ./quickro.sh <username> <pass>\n"
exit 0
fi

HASH_PASSWD="`echo -n $2|md5sum|sed s/\ -$//`"

echo "Running game as $1 with hash password $HASH_PASSWD ..."

cd $REGNUM_EXE_DIR && ./$REGNUM_EXE_FILE $1 $HASH_PASSWD &


You can call it directly in your /home/${USER}/bin with a proper $PATH.

surak
06-02-2012, 02:17 AM
This helps buts avoid patching so it should be used only in emergencies.