diff --git a/dumpyara.sh b/dumpyara.sh index 6ecabbd1af47c18ea699cc61505c9f15953c8123..9b6499e648614cf9721675da2d24d554155a0279 100755 --- a/dumpyara.sh +++ b/dumpyara.sh @@ -20,7 +20,7 @@ if echo "$1" | grep -e '^\(https\?\|ftp\)://.*$' > /dev/null; then URL=$1 cd "$PROJECT_DIR"/input || exit { type -p aria2c > /dev/null 2>&1 && printf "Downloading File...\n" && aria2c -x16 -j"$(nproc)" "${URL}"; } || { printf "Downloading File...\n" && wget -q --show-progress --progress=bar:force "${URL}" || exit 1; } - detox "${URL}" + detox "${URL##*/}" else URL=$(printf "%s\n" "$1") [[ -e "$URL" ]] || { echo "Invalid Input" && exit 1; } @@ -46,13 +46,19 @@ if [[ -d "$PROJECT_DIR/Firmware_extractor" ]]; then else git clone -q --recurse-submodules https://github.com/AndroidDumps/Firmware_extractor "$PROJECT_DIR"/Firmware_extractor fi -if [[ ! -d "$PROJECT_DIR/extract-dtb" ]]; then +if [[ -d "$PROJECT_DIR/extract-dtb" ]]; then + git -C "$PROJECT_DIR"/extract-dtb pull --recurse-submodules +else git clone -q https://github.com/PabloCastellano/extract-dtb "$PROJECT_DIR"/extract-dtb fi -if [[ ! -d "$PROJECT_DIR/mkbootimg_tools" ]]; then +if [[ -d "$PROJECT_DIR/mkbootimg_tools" ]]; then + git -C "$PROJECT_DIR"/mkbootimg_tools pull --recurse-submodules +else git clone -q https://github.com/carlitros900/mkbootimg_tools "$PROJECT_DIR/mkbootimg_tools" fi -if [[ ! -d "$PROJECT_DIR/vmlinux-to-elf" ]]; then +if [[ -d "$PROJECT_DIR/vmlinux-to-elf" ]]; then + git -C "$PROJECT_DIR"/vmlinux-to-elf pull --recurse-submodules +else git clone -q https://github.com/marin-m/vmlinux-to-elf "$PROJECT_DIR/vmlinux-to-elf" fi