fix typos install script 93/149293/1
authorJeonghoon Park <jh1979.park@samsung.com>
Tue, 12 Sep 2017 05:10:10 +0000 (14:10 +0900)
committerJeonghoon Park <jh1979.park@samsung.com>
Tue, 12 Sep 2017 05:10:10 +0000 (14:10 +0900)
Change-Id: I70021f3a580a0a582a870f87ea26d94c14420c89

tool/install_with_conf.sh

index d9d06c3..2d94936 100755 (executable)
@@ -9,7 +9,7 @@ display_help() {
 }
 
 ############
-if [ $# -lt 4 ] ; then
+if [ $# -lt 2 ] ; then
         display_help
 fi
 
@@ -33,15 +33,25 @@ else
        exit 1
 fi
 
-conf_file=/usr/apps/${pkg_name}/res/${conf_filemane}
+conf_file=/usr/apps/${pkg_name}/res/${conf_filename}
 
 sdb root on
 sdb shell mount -o remount rw /
 sdb push $2 /tmp
 sdb shell "rpm -ivh --force /tmp/$filename"
 
-sdb shell "sed -i -e 's/\(path=\).*/\1"${3//\//\\/}"/' ${conf_file}"
-sdb shell "sed -i -e 's/\(address=\).*/\1"${4//\//\\/}"/' ${conf_file}"
+if [ -z "$3" ];  then
+       sdb shell "sed -i -e 's/\(path=\).*/\1"${3//\//\\/}"/' ${conf_file}"
+else
+       echo "No argument for Device ID"
+fi
+
+
+if [ -z "$4" ];  then
+       sdb shell "sed -i -e 's/\(address=\).*/\1"${4//\//\\/}"/' ${conf_file}"
+else
+       echo "No argument for Web API URL"
+fi
 
 sdb shell pkg_initdb --ro