From 21e8cdb73470e11508aecaae20830af3fe03e10b Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Thu, 21 Dec 2023 20:47:19 +0100 Subject: i-players.sh -- initial revision --- scripts/i-players.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 scripts/i-players.sh (limited to 'scripts') diff --git a/scripts/i-players.sh b/scripts/i-players.sh new file mode 100755 index 0000000..f61f330 --- /dev/null +++ b/scripts/i-players.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# SPDX-FileCopyrightText: 2023 Markus Uhlin +# SPDX-License-Identifier: ISC + +i_players () { + local _path _dirs + + _path="${1}" + _dirs=" +a b c d e f g h i j k l m +n o p q r s t u v w x y z +" + + echo "installing..." + + for dir in ${_dirs}; do + printf "creating '%s': " "${_path}/${dir}" + if [ -d "${_path}/${dir}" ]; then + echo "already exists (good)" + else + install -d "${_path}/${dir}" + if [ $? -eq 0 ]; then + echo "done" + else + echo "error" + fi + fi + done +} + +i_players "${1}" -- cgit v1.2.3