neb/tools/repo/setup-server-folder.sh

7 lines
248 B
Bash

#!/bin/sh
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