diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-20 21:32:49 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-20 21:32:49 +0100 |
commit | efa828eaf64a6b636e2529ce8805622f08a9dba8 (patch) | |
tree | 4d82758acff450afd469462c1319848984589de6 | |
parent | 66053e29a678cd2c48a6f2f536b3ab7a43096f6c (diff) |
i-data-book.sh -- initial revision
-rwxr-xr-x | scripts/i-data-book.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/scripts/i-data-book.sh b/scripts/i-data-book.sh new file mode 100755 index 0000000..5e45ec3 --- /dev/null +++ b/scripts/i-data-book.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# SPDX-FileCopyrightText: 2023 Markus Uhlin <maxxe@rpblc.net> +# SPDX-License-Identifier: ISC + +i_data_book () { + local _src_prefix _dest _files + + _src_prefix=${1} + _dest=${2} + +# eco000.idx +# long001.idx +# nic000.idx + _files=" +changes.txt +eco999.idx +fen.doc +long999.idx +nic999.idx +opening.doc +" + + 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_book "${1}" "${2}" |