-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathdeb_create.sh
executable file
·85 lines (60 loc) · 2.35 KB
/
deb_create.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
################################################################################
APP_NAME=mscsim
APP_VER=0.4
################################################################################
APP_DIR=${APP_NAME}_${APP_VER}_focal_amd64
sudo rm -R $APP_DIR
sudo rm $APP_DIR.deb
mkdir $APP_DIR
mkdir $APP_DIR/DEBIAN
mkdir $APP_DIR/usr
mkdir $APP_DIR/usr/bin
mkdir $APP_DIR/usr/share
mkdir $APP_DIR/usr/share/applications
mkdir $APP_DIR/usr/share/icons
mkdir $APP_DIR/usr/share/icons/hicolor
mkdir $APP_DIR/usr/share/icons/hicolor/128x128
mkdir $APP_DIR/usr/share/icons/hicolor/128x128/apps
cp deb_mscsim_amd64.control $APP_DIR/DEBIAN/control
cp bin/mscsim $APP_DIR/usr/bin/
cp mscsim.desktop $APP_DIR/usr/share/applications/
cp mscsim.png $APP_DIR/usr/share/icons/hicolor/128x128/apps/
sudo chown root:root -R $APP_DIR
sudo chmod 0755 $APP_DIR/usr/bin/mscsim
sudo chmod 0755 $APP_DIR/usr/share/applications/mscsim.desktop
sudo chmod 0755 $APP_DIR/usr/share/icons/hicolor/128x128/apps/mscsim.png
dpkg -b $APP_DIR/
################################################################################
DATA_DIR=${APP_NAME}-data_${APP_VER}_focal_all
sudo rm -R $DATA_DIR
sudo rm $DATA_DIR.deb
mkdir $DATA_DIR
mkdir $DATA_DIR/DEBIAN
mkdir $DATA_DIR/usr
mkdir $DATA_DIR/usr/share
mkdir $DATA_DIR/usr/share/mscsim
cp deb_mscsim-data_all.control $DATA_DIR/DEBIAN/control
cp -R data/ $DATA_DIR/usr/share/mscsim
rm -R $DATA_DIR/usr/share/mscsim/data/cgi/scenery/terrain
sudo chown root:root -R $DATA_DIR/
dpkg -b $DATA_DIR/
################################################################################
DATA_TERRAIN_DIR=${APP_NAME}-data-terrain_0.1_focal_all
sudo rm -R $DATA_TERRAIN_DIR
sudo rm $DATA_TERRAIN_DIR.deb
mkdir $DATA_TERRAIN_DIR
mkdir $DATA_TERRAIN_DIR/DEBIAN
mkdir $DATA_TERRAIN_DIR/usr
mkdir $DATA_TERRAIN_DIR/usr/share
mkdir $DATA_TERRAIN_DIR/usr/share/mscsim
mkdir $DATA_TERRAIN_DIR/usr/share/mscsim/data
mkdir $DATA_TERRAIN_DIR/usr/share/mscsim/data/cgi
mkdir $DATA_TERRAIN_DIR/usr/share/mscsim/data/cgi/scenery
cp deb_mscsim-data-terrain_all.control $DATA_TERRAIN_DIR/DEBIAN/control
cp -R data/cgi/scenery/terrain/ $DATA_TERRAIN_DIR/usr/share/mscsim/data/cgi/scenery/
sudo chown root:root -R $DATA_TERRAIN_DIR/
dpkg -b $DATA_TERRAIN_DIR/
################################################################################
read -p "Press any key to continue..." -n1 -s
echo