diff options
| author | root <root@dc13.lemmi> | 2020-07-21 10:00:46 +0200 |
|---|---|---|
| committer | root <root@dc13.lemmi> | 2020-07-21 10:00:46 +0200 |
| commit | 1192c4575ea7afdf38e3fa0df4587a08620af11e (patch) | |
| tree | 6910a62487c282d0840d2e668aa7eb40b7c8a3fd /project/setup/cygwin-copy.sh | |
| parent | 76de8a89f7c1d1b4522eb66e8f89d248e8c1781f (diff) | |
SZS v2.18a
Diffstat (limited to 'project/setup/cygwin-copy.sh')
| -rwxr-xr-x | project/setup/cygwin-copy.sh | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/project/setup/cygwin-copy.sh b/project/setup/cygwin-copy.sh new file mode 100755 index 0000000..3ce6c46 --- /dev/null +++ b/project/setup/cygwin-copy.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash + + ##################################################################### + ## _______ _______ _______ ## + ## | ___ |____ | ___ | ## + ## | | |_| / /| | |_| ## + ## | |_____ / / | |_____ ## + ## |_____ | / / |_____ | ## + ## _ | | / / _ | | ## + ## | |___| |/ /____| |___| | ## + ## |_______|_______|_______| ## + ## ## + ## Wiimms SZS Tools ## + ## http://szs.wiimm.de/ ## + ## ## + ##################################################################### + ## ## + ## This file is part of the SZS project. ## + ## Visit http://szs.wiimm.de/ for project details and sources. ## + ## ## + ## Copyright (c) 2011-2019 by Dirk Clemens <wiimm@wiimm.de> ## + ## ## + ##################################################################### + +#------------------------------------------------------------------------------ +# setup + +CYGWIN_DIR="@@CYGWIN-DIR@@" +CYGWIN_TOOLS="@@CYGWIN-TOOLS@@" +BIN_FILES="@@BIN-FILES@@" +DISTRIB_PATH="@@DISTRIB-PATH@@" + +BIN_PATH="$DISTRIB_PATH/bin" +mkdir -p "$BIN_PATH" || exit 1 + +#------------------------------------------------------------------------------ +# copy cygwin tools + +for tool in $CYGWIN_TOOLS +do + cp --preserve=time "$CYGWIN_DIR/$tool.exe" "$BIN_PATH" || exit 1 +done + +#------------------------------------------------------------------------------ +# copy wit tools + +for tool in $BIN_FILES +do + if [[ -s ./$tool.exe ]] + then + CYGWIN_TOOLS="$CYGWIN_TOOLS $tool" + ln -f ./$tool.exe "$BIN_PATH" || exit 1 + fi +done + +#------------------------------------------------------------------------------ +# copy needed cygwin dlls + +for tool in $CYGWIN_TOOLS +do + ldd "$BIN_PATH/$tool.exe" | grep -F "=> $CYGWIN_DIR/" | awk '{print $1}' +done | sort | uniq | while read dll +do + cp --preserve=time "$CYGWIN_DIR/$dll" "$BIN_PATH" || exit 1 +done + +#------------------------------------------------------------------------------ +# done + +exit 0 + |
