diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-22 22:02:00 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-22 22:02:00 +0100 |
commit | 06fa692de61a7ddac04a70235d411800faee7e87 (patch) | |
tree | 727d6bef1108de867ffb9b650ae444b9c8eaaf71 /scripts | |
parent | b3d1825bdd01626efe9d6b6493cf8a00222ba784 (diff) |
i-data-uscf.sh -- initial revision
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/i-data-uscf.sh | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/scripts/i-data-uscf.sh b/scripts/i-data-uscf.sh new file mode 100755 index 0000000..635c7fe --- /dev/null +++ b/scripts/i-data-uscf.sh @@ -0,0 +1,88 @@ +#!/bin/sh +# SPDX-FileCopyrightText: 2023 Markus Uhlin <maxxe@rpblc.net> +# SPDX-License-Identifier: ISC + +i_data_uscf () { + local _src_prefix _dest _files + + _src_prefix=${1} + _dest=${2} + + _files=" +ak +al +ar +az +beginner +ca_n +ca_s +co +ct +dc +de +fl +foreign +ga +gran_prix +help +hi +ia +id +il +in +ks +ky +la +ma +md +me +mi +mn +mo +ms +mt +national +nc +nd +ne +nh +nj +nm +nv +ny +oh +ok +or +pa +ri +sc +sd +tn +tx +ut +va +vt +wa +wi +wv +wy +" + + 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_uscf "${1}" "${2}" |