diff --git a/android-interact.sh b/android-interact.sh index acf4c74..5708478 100755 --- a/android-interact.sh +++ b/android-interact.sh @@ -3,12 +3,12 @@ # Date: Fri Jun 26 10:38:07 2015 +0800 # Author: Yuxin Wu -source compatibility.sh - -PROG_NAME=`$REALPATH "$0"` +PROG_NAME=`python -c "import os, sys; print(os.path.realpath(sys.argv[1]))" "$0"` PROG_DIR=`dirname "$PROG_NAME"` cd "$PROG_DIR" +source compatibility.sh + # Please check that your path is the same, since this might be different among devices RES_DIR="/mnt/sdcard/tencent/MicroMsg" MM_DIR="/data/data/com.tencent.mm" diff --git a/compatibility.sh b/compatibility.sh index 0f99b4a..d910311 100755 --- a/compatibility.sh +++ b/compatibility.sh @@ -3,16 +3,10 @@ # $Date: Tue Jun 16 22:23:36 2015 +0800 # Author: Vury Leo -realpath() { - [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" -} - if [ `uname` = 'Darwin' ]; then - REALPATH='realpath' GREP='grep -E' MD5SUM='md5' else - REALPATH='readlink -f' GREP='grep -E' MD5SUM='md5sum' fi