Skip to content

Commit

Permalink
extractor.sh: Update dependency fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
erfanoabdi committed Jan 21, 2020
1 parent 9742bd6 commit a920a2e
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions extractor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,25 @@ if [ "$1" == "" ]; then
fi

LOCALDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
[[ ! -d "$LOCALDIR/tools/extract_android_ota_payload" ]] && git clone -q https://github.com/cyxx/extract_android_ota_payload.git "$LOCALDIR/tools/extract_android_ota_payload"
[[ ! -d "$LOCALDIR/tools/oppo_ozip_decrypt" ]] && git clone -q https://github.com/bkerler/oppo_ozip_decrypt.git "$LOCALDIR/tools/oppo_ozip_decrypt"
[[ ! -d "$LOCALDIR/tools/update_payload_extractor" ]] && git clone -q https://github.com/erfanoabdi/update_payload_extractor.git "$LOCALDIR/tools/update_payload_extractor"
HOST="$(uname)"
toolsdir="$LOCALDIR/tools"

if [[ ! -d "$toolsdir/extract_android_ota_payload" ]]; then
git clone -q https://github.com/cyxx/extract_android_ota_payload.git "$toolsdir/extract_android_ota_payload"
else
git -C "$toolsdir/extract_android_ota_payload" pull
fi
if [[ ! -d "$toolsdir/oppo_ozip_decrypt" ]]; then
git clone -q https://github.com/bkerler/oppo_ozip_decrypt.git "$toolsdir/oppo_ozip_decrypt"
else
git -C "$toolsdir/oppo_ozip_decrypt" pull
fi
if [[ ! -d "$toolsdir/update_payload_extractor" ]]; then
git clone -q https://github.com/erfanoabdi/update_payload_extractor.git "$toolsdir/update_payload_extractor"
else
git -C "$toolsdir/update_payload_extractor" pull
fi

simg2img="$toolsdir/$HOST/bin/simg2img"
packsparseimg="$toolsdir/$HOST/bin/packsparseimg"
unsin="$toolsdir/$HOST/bin/unsin"
Expand Down

0 comments on commit a920a2e

Please sign in to comment.