Remove patch check for cygwin
[auto-patcher.git] / batch.sh
blob829b3ff1a6f196fbec18ca02529df86c1d66222b
1 #!/bin/bash
3 abspath () {
4 case `uname -s` in
5 CYGWIN*)
6 echo $(cygpath -ua "$1") | sed 's:/$::g'
7 ;;
8 Darwin)
9 #[[ $(echo $1 | awk '/^\//') == $1 ]] && echo "$1" || echo "$PWD/$1"
10 [[ ${1:0:1} == "/" ]] && echo "$1" || echo "$PWD/$1"
12 Linux)
13 echo $(readlink -f "$1")
16 if [[ ${1:0:1} == "/" ]]; then
17 echo "$1"
18 elif [[ ${1:0:2} == "./" ]]; then
19 echo "$PWD/${1:2}"
20 else
21 echo "$PWD/$1"
24 esac
27 extpath () {
28 case `uname -s` in
29 CYGWIN*)
30 echo $(cygpath -da "$1")
33 echo $(abspath "$1")
35 esac
37 ROOT=$(abspath `dirname "$0"`)
38 ROM=$(abspath "$1")
39 ROMX=$(extpath "$1")
42 cd "$ROOT/patch_tools"
43 tar cvzf ../patch_tools.tgz *.jar updatecert.pem updatekey.pk8 boot cygwin mac linux
44 cd "$ROOT"
46 tar cvzf patch_patches.tgz patches
48 zip autopatcher.zip auto_patcher patch_tools.tgz patch_patches.tgz ap_scripts/*