forked from mateor/auto-patcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
batch.sh
executable file
·45 lines (40 loc) · 833 Bytes
/
batch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
abspath () {
case `uname -s` in
CYGWIN*)
echo $(cygpath -ua "$1") | sed 's:/$::g'
;;
Darwin)
#[[ $(echo $1 | awk '/^\//') == $1 ]] && echo "$1" || echo "$PWD/$1"
[[ ${1:0:1} == "/" ]] && echo "$1" || echo "$PWD/$1"
;;
Linux)
echo $(readlink -f "$1")
;;
*)
if [[ ${1:0:1} == "/" ]]; then
echo "$1"
elif [[ ${1:0:2} == "./" ]]; then
echo "$PWD/${1:2}"
else
echo "$PWD/$1"
fi
;;
esac
}
extpath () {
case `uname -s` in
CYGWIN*)
echo $(cygpath -da "$1")
;;
*)
echo $(abspath "$1")
;;
esac
}
ROOT=$(abspath `dirname "$0"`)
cd "$ROOT/patch_tools"
tar cvzf ../patch_tools.tgz *.jar updatecert.pem updatekey.pk8 boot cygwin mac linux
cd "$ROOT"
tar cvzf patch_patches.tgz patches
zip autopatcher.zip auto_patcher patch_tools.tgz patch_patches.tgz ap_scripts/*