forked from chaosforgeorg/fpcvalkyrie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mksrc.sh
41 lines (29 loc) · 795 Bytes
/
mksrc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -eu
# $1 must be a version number, like '098-beta4'
VERSION="$1"
shift 1
SRCDIR=src
#if [ -n "$IS_SOUND" ]; then
# SOUND_SUFFIX=''
#else
# SOUND_SUFFIX='-nosound'
#fi
SRC_BASE_NAME=valkyrie-"$VERSION"
# Prepare temp dir
DIST_TMP_PATH=pkg/"$SRC_BASE_NAME"/
rm -Rf "$DIST_TMP_PATH"
/bin/mkdir "$DIST_TMP_PATH" "$DIST_TMP_PATH"src
cp -R "$SRCDIR"/*.pas "$DIST_TMP_PATH"src
cp -R "$SRCDIR"/*.inc "$DIST_TMP_PATH"src
cp -R "$SRCDIR"/*.txt "$DIST_TMP_PATH"src
# Pack ----------------------------------------
DIST_ARCHIVE_NAME="$SRC_BASE_NAME".zip
cd pkg
rm -f "$DIST_ARCHIVE_NAME"
zip -r "$DIST_ARCHIVE_NAME" "$SRC_BASE_NAME"
cd ..
#tar czf "$DIST_ARCHIVE_NAME" "$ARCHIVE_BASE_NAME"
#pushd > /dev/null
cp pkg/"$DIST_ARCHIVE_NAME" .
echo 'Made '"$DIST_ARCHIVE_NAME"