From 253dbe741cea2f909616cb5191c689c73f15eb16 Mon Sep 17 00:00:00 2001 From: Raine Date: Fri, 20 Oct 2023 02:09:20 +0200 Subject: [PATCH] fix: add some stuff to script --- tools/repo/setup-server-folder.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/repo/setup-server-folder.sh b/tools/repo/setup-server-folder.sh index 69b0bcb..b218894 100644 --- a/tools/repo/setup-server-folder.sh +++ b/tools/repo/setup-server-folder.sh @@ -1,3 +1,7 @@ #!/bin/sh -cp -r servers/skel/. servers/${1:-$(hostname)} \ No newline at end of file +if ! [ -d "servers/${1:-$HOSTNAME}" ]; then + echo "setting up servers/${1:-$HOSTNAME}..." + cp -r servers/skel/. servers/${1:-$HOSTNAME} + echo "server configuration for \`${1:-$HOSTNAME}\`." >servers/${1:-$HOSTNAME}/README.md +fi