cleanup: shfmt, shellcheck, and whitespace
[webi-installers/.git] / _webi / example_install_safe_copy.sh
1 # For installing from the extracted package tmp directory
2 pkg_install() {
3     pushd "$WEBI_TMP" 2>&1 > /dev/null
4
5     if [ -n "$(command -v rsync 2> /dev/null | grep rsync)" ]; then
6         rsync -Krl ./xmpl*/ "$pkg_src/" 2> /dev/null
7     else
8         cp -Hr ./xmpl*/* "$pkg_src/" 2> /dev/null
9         cp -Hr ./xmpl*/.* "$pkg_src/" 2> /dev/null
10     fi
11     rm -rf ./xmpl*
12
13     popd 2>&1 > /dev/null
14 }