Skip to content

Commit

Permalink
add extract-aqtk.sh
Browse files Browse the repository at this point in the history
AquesTalk の規約に沿って展開するシェルスクリプトを作った
  • Loading branch information
Na-x4 committed Nov 2, 2021
1 parent ba87326 commit 5e5c0e3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.git
target
aquestalk
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/target
/app
/aquestalk
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ WORKDIR /home/user
COPY --chown=user:user / /home/user/aquestalk-proxy
RUN cd aquestalk-proxy \
&& cargo build --release \
&& unzip aqtk_mv_20090609.zip \
&& mkdir app && cd app \
&& mv ../target/i686-pc-windows-gnu/release/aquestalk-proxy.exe ./aquestalk-proxy.exe \
&& mv ../AquesTalk_mv/bin ./aquestalk\
&& find ./aquestalk/ -mindepth 1 -maxdepth 1 -type d -exec cp ../AquesTalk_mv/AqLicense.txt {} \; \
&& rm -rf ../AquesTalk_mv \
&& ../extract-aqtk.sh \
&& mv ../aquestalk ./aquestalk \
&& cp ../README.md ./ \
&& cp ../COPYING ./

Expand Down
14 changes: 14 additions & 0 deletions extract-aqtk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
set -eux
cd "$(dirname "$0")"

if [ -e aquestalk ]; then
exit 1
fi

TMPDIR=$(mktemp -d)

unzip -d "$TMPDIR" aqtk_mv_20090609.zip
mv "$TMPDIR"/AquesTalk_mv/bin ./aquestalk
find ./aquestalk/ -mindepth 1 -maxdepth 1 -type d -exec cp "$TMPDIR"/AquesTalk_mv/AqLicense.txt {} \;
rm -rf "$TMPDIR"

0 comments on commit 5e5c0e3

Please sign in to comment.