From 946ae2b9875f6042a3ad3456cce98017008bdd5a Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Sat, 2 Nov 2024 18:51:04 +0100 Subject: [PATCH] allow dashes and underscores, fixed incorrect command in guide --- README.md | 2 +- setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 61277ed..ec274f5 100755 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Either install GNOME or Minimal depending on if you intend to setup a server or Clone the repository to your home directory, you can do this by opening a shell with git installed. ```bash -nixos-shell -p git +nix-shell -p git git clone https://git.mvl.sh/vleeuwenmenno/dotfiles.git ~/dotfiles exit ``` diff --git a/setup.sh b/setup.sh index c965134..474706b 100755 --- a/setup.sh +++ b/setup.sh @@ -45,7 +45,7 @@ prepare_hostname() { read hostname # Validate hostname to ensure it's not empty, contains only alphanumeric characters, and is less than 64 characters - while [[ -z $hostname || ! $hostname =~ ^[a-zA-Z0-9]+$ || ${#hostname} -gt 64 ]]; do + while [[ -z $hostname || ! $hostname =~ ^[a-zA-Z0-9_-]+$ || ${#hostname} -gt 64 ]]; do echo "Invalid hostname. Please enter a valid hostname:" read hostname done