diff options
author | Andrey Kvochko <a.kvochko@samsung.com> | 2017-10-26 13:41:35 +0300 |
---|---|---|
committer | Andrey Kvochko/SRR-Compiler Lab/./삼성전자 <a.kvochko@samsung.com> | 2017-10-26 13:48:53 +0300 |
commit | 7a6540889d15872d63f7134a269a81d46b504d7e (patch) | |
tree | 5953f6b9638cd4f15010bf5d7bd0f4624120700a /scripts | |
parent | 43ff3366c5a339336ba2c72abca907c21654e38d (diff) | |
download | heaptrack-7a6540889d15872d63f7134a269a81d46b504d7e.tar.gz heaptrack-7a6540889d15872d63f7134a269a81d46b504d7e.tar.bz2 heaptrack-7a6540889d15872d63f7134a269a81d46b504d7e.zip |
Fix typo and read_consent
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/common.sh | 12 | ||||
-rwxr-xr-x | scripts/prepare-device.sh | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/scripts/common.sh b/scripts/common.sh index a37688f..6b63156 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -50,9 +50,9 @@ read_dir() { read_consent() { local __prompt=$1 local __result=$2 - local __tmp="" - read_one_of "$__prompt" "Y n" __tmp - if [ "$tmp" == "Y" ]; then + local __consent="" + read_one_of "$__prompt" "Y n" __consent + if [ "$__consent" == "Y" ]; then export $__result=true else export $__result=false @@ -60,7 +60,9 @@ read_consent() { } test_sdb_version() { - read_file "sdb was not found. Enter sdb path [] " SDB + if [ -z "$SDB" ]; then + read_file "sdb was not found. Enter sdb path [] " SDB + fi ver=( $($SDB version | sed -r 's/.*([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 \2 \3/g') ) if [[ "${ver[0]}" < "2" ]] || [[ "${ver[1]}" < "3" ]]; then echo "Unsupported sdb version: ${ver[0]}.${ver[1]}.${ver[2]}. Please update sdb to at least 2.3.0" @@ -76,4 +78,4 @@ test_sdb_version() { echo "Error: only one device must be attached" exit 1 fi -}
\ No newline at end of file +} diff --git a/scripts/prepare-device.sh b/scripts/prepare-device.sh index 8db20f7..8be808d 100755 --- a/scripts/prepare-device.sh +++ b/scripts/prepare-device.sh @@ -22,7 +22,7 @@ echo " - /usr/share/dotnet-tizen -> /opt/usr/dotnet-tizen" echo " - /usr/lib/debug -> /opt/usr/lib/debug" echo " - /usr/src/debug -> /opt/usr/src/debug" echo "Symlinks to new locations will be created in old locations." -5 + read_consent "Do you want to proceed?" consent if ! $consent; then echo "Can not proceed without preparing the device" |