From c6afbd73cf9ee6991817c2c202de7df94a77cd38 Mon Sep 17 00:00:00 2001 From: carlitros900 Date: Wed, 14 Oct 2020 21:57:33 +0000 Subject: [PATCH 1/2] Fix bug, sanitize filename instead of full url --- dumpyara.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dumpyara.sh b/dumpyara.sh index 6ecabbd..6d051e0 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; } -- GitLab From fdf2b268593ff5092086e7f922d32be4492b85e7 Mon Sep 17 00:00:00 2001 From: carlitros900 Date: Wed, 14 Oct 2020 22:02:01 +0000 Subject: [PATCH 2/2] do a update of external repos if previously cloned --- dumpyara.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dumpyara.sh b/dumpyara.sh index 6d051e0..9b6499e 100755 --- a/dumpyara.sh +++ b/dumpyara.sh @@ -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 -- GitLab