allow dashes and underscores, fixed incorrect command in guide
This commit is contained in:
parent
11fd6bc478
commit
946ae2b987
@ -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.
|
Clone the repository to your home directory, you can do this by opening a shell with git installed.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nixos-shell -p git
|
nix-shell -p git
|
||||||
git clone https://git.mvl.sh/vleeuwenmenno/dotfiles.git ~/dotfiles
|
git clone https://git.mvl.sh/vleeuwenmenno/dotfiles.git ~/dotfiles
|
||||||
exit
|
exit
|
||||||
```
|
```
|
||||||
|
2
setup.sh
2
setup.sh
@ -45,7 +45,7 @@ prepare_hostname() {
|
|||||||
read hostname
|
read hostname
|
||||||
|
|
||||||
# Validate hostname to ensure it's not empty, contains only alphanumeric characters, and is less than 64 characters
|
# 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:"
|
echo "Invalid hostname. Please enter a valid hostname:"
|
||||||
read hostname
|
read hostname
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user