aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-22 20:48:01 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-22 20:48:01 +0100
commit02b796fad3143f603f14de3af8a5f2f6a1c3fa6c (patch)
tree5324a0e228390966241685eb1643b4b7305449e7
parentd7a16010b2200826f142d6e1b2925b2bc54f2506 (diff)
i-data-boards-openings.sh -- initial revision
-rwxr-xr-xscripts/i-data-boards-openings.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/scripts/i-data-boards-openings.sh b/scripts/i-data-boards-openings.sh
new file mode 100755
index 0000000..30d3518
--- /dev/null
+++ b/scripts/i-data-boards-openings.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+# SPDX-FileCopyrightText: 2023 Markus Uhlin <maxxe@rpblc.net>
+# SPDX-License-Identifier: ISC
+
+i_data_boards_openings () {
+ local _src_prefix _dest _files
+
+ _src_prefix=${1}
+ _dest=${2}
+
+ _files="
+double-d-pawn
+double-e-pawn
+giouco-piano
+kings-gambita
+kings-gambita-be7
+kings-gambita-fischer
+kings-gambita-nc6
+kings-gambita-schallop
+kings-gambitd-bc5
+kings-gambitd-d6
+kings-gambitd-falkbeer
+kings-gambitd-nf6
+kings-gambitd-nimzo
+ruy-lopez
+"
+
+ 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_boards_openings "${1}" "${2}"