aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/i-players.sh
blob: f61f330ba1341ec19879f6eb94c9e252e0a9d7f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
# SPDX-FileCopyrightText: 2023 Markus Uhlin <maxxe@rpblc.net>
# 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}"