]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Init: take folder argument into account
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 22 May 2019 21:58:32 +0000 (18:58 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 22 May 2019 21:58:32 +0000 (18:58 -0300)
kvmx

diff --git a/kvmx b/kvmx
index eeff0e3b7600c879388c185b377154b3f72d122d..b146a289df3393c2661e7361b54c737aacd81a96 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -1162,7 +1162,12 @@ function kvmx_init {
     fi
   else
     VM="$FOLDER"
-    FOLDER="$(pwd)/$VM"
+
+    if [ ! -z "$2" ]; then
+      FOLDER="$2"
+    else
+      FOLDER="$(pwd)/$VM"
+    fi
   fi
 
   if [ -e "$GLOBAL_USER_CONFIG_FOLDER/$VM" ]; then