From cbdab98cff9f5372b6e9ed6cd751d69a0348baea Mon Sep 17 00:00:00 2001
From: Santiago Lo Coco <santilococo.01@gmail.com>
Date: Tue, 8 Feb 2022 13:41:46 -0300
Subject: [PATCH] Add .gitignore

---
 .gitignore |  2 ++
 test.sh    | 24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 test.sh

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3a4073c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+dotfiles/.gitconfig
+dotfiles/.gitconfig-work
diff --git a/test.sh b/test.sh
new file mode 100644
index 0000000..99a7eaa
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,24 @@
+source sadedot/scripts/common.sh
+setDialogBox "dialog"
+
+    msg="\nEnter an absolute folder path where you would like to use the work account."
+    gitWorkPath=$(displayDialogBox --inputbox "$msg" VALUES 3>&1 1>&2 2>&3)
+    checkCancel "You must enter a path." && return
+    gitWorkPath=$(echo "$gitWorkPath" | envsubst)
+    mkdir -p "$gitWorkPath"
+    while [[ ! -d "$gitWorkPath" ]]; do
+        msg="\nPath isn't valid. Please try again."
+        gitWorkPath=$(displayDialogBox --inputbox "$msg" VALUES 3>&1 1>&2 2>&3)
+        checkCancel "You must enter a path." && return
+        gitWorkPath=$(echo "$gitWorkPath" | envsubst)
+        mkdir -p "$gitWorkPath"
+    done
+
+    gitWorkName=$(displayDialogBox --inputbox "\nEnter a name." VALUES 3>&1 1>&2 2>&3)
+    checkCancel "You must enter a name." && return
+    gitWorkMail=$(displayDialogBox --inputbox "\nEnter an e-mail." VALUES 3>&1 1>&2 2>&3)
+    checkCancel "You must enter an e-mail." && return
+
+        msg="\nPlease confirm that the data you entered is correct:\n\n -"
+        msg="${msg} Name: ${gitWorkName}\n - E-mail: ${gitWorkMail}\n - Path: ${gitWorkPath}"
+        displayDialogBox --yesno "$msg" && break
\ No newline at end of file