aboutsummaryrefslogtreecommitdiffstats
path: root/ficspaths.sh
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-18 23:24:03 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-18 23:24:03 +0100
commit3164b41c4de3853fbb318fc86d2f798233d4eda5 (patch)
tree81d5a9b27244fa4dae07794a63f18139d9f85ee2 /ficspaths.sh
parent5506d6b7e4e67307fa090842ad932bf5369c1fbf (diff)
ficspaths.sh -- initial revision
Diffstat (limited to 'ficspaths.sh')
-rwxr-xr-xficspaths.sh56
1 files changed, 56 insertions, 0 deletions
diff --git a/ficspaths.sh b/ficspaths.sh
new file mode 100755
index 0000000..f18c4cc
--- /dev/null
+++ b/ficspaths.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+# SPDX-FileCopyrightText: 2023 Markus Uhlin <maxxe@rpblc.net>
+# SPDX-License-Identifier: ISC
+
+if [ $# -ne 1 ]; then
+ echo "bogus number of args"
+ exit 1
+fi
+
+HDRPATH=include/ficspaths.h
+
+PREFIX=$1
+shift
+
+cat <<EOF >${HDRPATH}
+#ifndef _FICSPATHS_H_
+#define _FICSPATHS_H_
+
+#define DEFAULT_ADHELP "${PREFIX}/data/admin"
+#define DEFAULT_ADJOURNED "${PREFIX}/games/adjourned"
+#define DEFAULT_BOARDS "${PREFIX}/data/boards"
+#define DEFAULT_BOOK "${PREFIX}/data/book"
+#define DEFAULT_COMHELP "${PREFIX}/data/com_help"
+#define DEFAULT_CONFIG "${PREFIX}/config"
+#define DEFAULT_HELP "${PREFIX}/data/help"
+#define DEFAULT_HISTORY "${PREFIX}/games/history"
+#define DEFAULT_INDEX "${PREFIX}/data/index"
+#define DEFAULT_INFO "${PREFIX}/data/info"
+#define DEFAULT_JOURNAL "${PREFIX}/games/journal"
+#define DEFAULT_LISTS "${PREFIX}/data/lists"
+#define DEFAULT_MESS "${PREFIX}/data/messages"
+#define DEFAULT_NEWS "${PREFIX}/data/news"
+#define DEFAULT_PLAYERS "${PREFIX}/players"
+#define DEFAULT_SOURCE "${PREFIX}/FICS"
+#define DEFAULT_STATS "${PREFIX}/data/stats"
+#define DEFAULT_USAGE "${PREFIX}/data/usage"
+#define DEFAULT_USCF "${PREFIX}/data/uscf"
+
+#define HELP_DANISH "${PREFIX}/data/Danish"
+#define HELP_FRENCH "${PREFIX}/data/French"
+#define HELP_SPANISH "${PREFIX}/data/Spanish"
+
+#define MESS_FULL "${PREFIX}/data/messages/full"
+#define MESS_FULL_UNREG "${PREFIX}/data/messages/full_unreg"
+
+#define USAGE_DANISH "${PREFIX}/data/usage_danish"
+#define USAGE_FRENCH "${PREFIX}/data/usage_french"
+#define USAGE_SPANISH "${PREFIX}/data/usage_spanish"
+
+#endif
+EOF
+
+if [ ! -r ${HDRPATH} ]; then
+ echo "fatal: error creating ${HDRPATH}"
+ exit 1
+fi