-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpackage_linux.sh
executable file
·37 lines (29 loc) · 1.07 KB
/
package_linux.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
#!/bin/bash
# Remove dmine install directory if it already exists.
if [ -d ./dmine ]; then
rm -rf ./dmine
fi
# Remove dmine package if it already exists.
if [ -f ./dmine_linux.zip ]; then
rm ./dmine_linux.zip
fi
# Install dmine using dmine.spec.
pyinstaller --distpath=./dmine dmine.spec
# Move the binary dependency directory up by one directory.
mv ./dmine/dmine/dep-bin/ ./dmine/
# Copy the linux installer shell script into the package directory.
if [ ! -f ./installer/linux/installer_linux.sh ]; then
echo "Linux installer script for dmine not found. Aborting packaging."
exit -1
fi
cp ./installer/linux/installer_linux.sh ./dmine/install.sh
# Copy the shortcut shell script into the package directory.
if [ ! -f ./installer/linux/shortcut.sh ]; then
echo "Linux shortcut script for dmine not found. Aborting packaging."
exit -1
fi
cp ./installer/linux/shortcut.sh ./dmine/shortcut.sh
# Create a brief readme for instruction to install.
echo "Please run install.sh to install dmine." > ./dmine/readme.txt
# Package in a zip file.
zip -r dmine_linux.zip ./dmine