aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-23 00:40:46 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-23 00:40:46 +0100
commit4967a7799fe80a93a861424d844e054eeb532a50 (patch)
tree5cf685b829b847e1252a60ef26bb2f94bd1a8ab3
parented8d9fe8ad6c3f2deabada4cd0811868a274299e (diff)
i-data-index.sh -- initial revision
-rwxr-xr-xscripts/i-data-index.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/scripts/i-data-index.sh b/scripts/i-data-index.sh
new file mode 100755
index 0000000..38740b4
--- /dev/null
+++ b/scripts/i-data-index.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+# SPDX-FileCopyrightText: 2023 Markus Uhlin <maxxe@rpblc.net>
+# SPDX-License-Identifier: ISC
+
+i_data_index () {
+ local _src_prefix _dest _files
+
+ _src_prefix=${1}
+ _dest=${2}
+
+ _files="
+all
+analysis
+commands
+game_info
+help
+_index
+mail
+play
+preferences
+server_info
+simul
+special
+talk
+user_info
+"
+
+ echo "installing..."
+
+ for file in ${_files}; do
+ printf "%s -> %s: " "${_src_prefix}/${file}" "${_dest}/${file}"
+ if [ -r "${_src_prefix}/${file}" ]; then
+ install -m 0644 "${_src_prefix}/${file}" "${_dest}"
+ if [ $? -eq 0 ]; then
+ echo "ok"
+ else
+ echo "error"
+ fi
+ else
+ echo "not found"
+ fi
+ done
+}
+
+i_data_index "${1}" "${2}"