Updated IPV4 regex.
This commit is contained in:
+2
-2
@@ -47,7 +47,7 @@ get_valid_input() {
|
|||||||
|
|
||||||
# Handle Regex Validation
|
# Handle Regex Validation
|
||||||
if [[ -n "${REGEX}" ]]; then
|
if [[ -n "${REGEX}" ]]; then
|
||||||
if [[ ${INPUT} =~ ${REGEX} ]]; then
|
if [[ "${INPUT}" =~ ${REGEX} ]]; then
|
||||||
export "${VAR_NAME}"="${INPUT}"
|
export "${VAR_NAME}"="${INPUT}"
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
@@ -117,7 +117,7 @@ setup_ssh() {
|
|||||||
Target IP address : $(gum style --italic "\"${LIVE_TARGET_IP}\"")
|
Target IP address : $(gum style --italic "\"${LIVE_TARGET_IP}\"")
|
||||||
Target password : $(gum style --italic "\"${LIVE_TARGET_PASSWORD}\"")"
|
Target password : $(gum style --italic "\"${LIVE_TARGET_PASSWORD}\"")"
|
||||||
gum confirm "Are these correct ?" || {
|
gum confirm "Are these correct ?" || {
|
||||||
get_valid_input "LIVE_TARGET_IP" "➡️ Provide the IP address of your machine in a NixOS live environment :" "192.168.1.100" "IP_REGEX";
|
get_valid_input "LIVE_TARGET_IP" "➡️ Provide the IP address of your machine in a NixOS live environment :" "192.168.1.100" "${IP_REGEX}";
|
||||||
get_valid_input "LIVE_TARGET_PASSWORD " "➡️ Provide the password of your machine in a NixOS live environment :" "password" "" "true" "true";
|
get_valid_input "LIVE_TARGET_PASSWORD " "➡️ Provide the password of your machine in a NixOS live environment :" "password" "" "true" "true";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user