Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit fc1ad77

Browse files
committed
v3.2.0: Checks if installation directory exists before running the script
1 parent f0e77ee commit fc1ad77

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
Quick ADB / Fastboot installer for OS X and Linux (minimal_adb_fastboot)
22
====================
33

4-
Quick info: If you are handling with Android M previews, please check out the [preview](https://github.com/simmac/minimal_adb_fastboot/tree/preview) branch!
5-
6-
Last updated: 5.10.2015 | adb version: 1.0.32 Revision eac51f2bb6a8-android
4+
Last updated: 1.3.2016 | adb version: 1.0.32 Revision eac51f2bb6a8-android
75
------------------------
86
Installs the adb and fastboot binaries for OS X and Linux.
97

@@ -31,7 +29,8 @@ Changelog:
3129
- 1.2.1 | 13.03.2015 Improved version check by adding a hash-check to compare installed and delivered bin.
3230
- 2.0.0 | 14.03.2015 Added Linux support! (experimental, feedback very welcome!)
3331
- 3.0.0 | 31.05.2015 Improved code quality and readability a lot by rewriting the whole script and using functions. Added the arguments *uninstall*, *adb* and *fastboot*. **Changed the installation path on OS X to /usr/local/bin !**
34-
- **3.1.0 | 05.10.2015** Updated to newest v23 binaries. Required for Android Marshmallow on flounder.
32+
- 3.1.0 | 05.10.2015 Updated to newest v23 binaries. Required for Android Marshmallow on flounder.
33+
- **3.2.0** | 01.03.2016 Checks if installation directory exists before running the script
3534

3635
Support Thread:
3736
----------------

install.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
clear
3-
echo -e "\n\nQuick adb/fastboot installer 3.1.0\n"
3+
echo -e "\n\nQuick adb/fastboot installer 3.2.0\n"
44

55
#Gets location of the script
66
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -21,6 +21,14 @@ function oscheck () {
2121
BINPATH="$DIR/linux"
2222
MD5="md5sum"
2323
fi
24+
25+
#check whether the installation directory exists and creates it if needed.
26+
if [ ! -d "$INSTALLPATH" ]; then
27+
echo -e "The target directory doesn't exist. This script will create the directory for you."
28+
echo -e "You may be asked for your password now. \n"
29+
sudo mkdir $INSTALLPATH
30+
echo -e "\nDirectory created. The installation script will begin now.\n"
31+
fi
2432
}
2533

2634

0 commit comments

Comments
 (0)