-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmkpkg.sh
More file actions
40 lines (38 loc) · 774 Bytes
/
mkpkg.sh
File metadata and controls
40 lines (38 loc) · 774 Bytes
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
#!/bin/sh
if [ "$1x" = "x" ] ; then
echo "Please specify an app api name."
else
app="$1"
zipfile="$app.zip"
if [ -f "$zipfile" ]
then
echo "Removing "$zipfile
rm $zipfile
fi
zipfile="$app.dfpkg"
if [ -f "$zipfile" ]
then
echo "Removing "$zipfile
rm $zipfile
fi
other=""
if [ -f "description.json" ]
then
other=$other" description.json"
fi
if [ -f "schema.json" ]
then
other=$other" schema.json"
fi
if [ -f "data.json" ]
then
other=$other" data.json"
fi
if [ -f "services.json" ]
then
other=$other" services.json"
fi
zip -r $zipfile $app $other -x "*/\.*"
zipfile="$app.zip"
zip -r $zipfile $app -x "*/\.*"
fi