This repository was archived by the owner on Apr 11, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgenerate.sh
More file actions
executable file
·56 lines (45 loc) · 1.33 KB
/
generate.sh
File metadata and controls
executable file
·56 lines (45 loc) · 1.33 KB
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
#!/bin/bash
# Check flatpak installed
if ! type "flatpak" &> /dev/null
then
echo "'flatpak' command not found :("
exit 1
fi
# Locate (and update) Monodevelop
MDFDIR="$HOME/.local/share/flatpak/app/com.xamarin.MonoDevelop/current/active/files"
MDU="$(flatpak list | grep com.xamarin.MonoDevelop | grep user)"
MDS="$(flatpak list | grep com.xamarin.MonoDevelop | grep system)"
if [ -n "$MDS" ]
then
MDFDIR="/var/lib/flatpak/app/com.xamarin.MonoDevelop/current/active/files"
flatpak update com.xamarin.MonoDevelop
elif [ -n "$MDU" ]
then
flatpak update --user com.xamarin.MonoDevelop
else
flatpak install --user --from https://download.mono-project.com/repo/monodevelop.flatpakref
fi
if [ ! -d $MDFDIR ]
then
echo "Could not locate MonoDevelop from flatpak, please make sure it is installed."
exit 1
fi
mkdir tmp
cd tmp
# Copy installer source
echo "Copying installer data..."
mkdir installer
cp -rf "../src/." "installer"
# Copy MonoDevelop binaries
mkdir installer/MonoDevelop
cp -rf "$MDFDIR/lib/monodevelop/." "installer/MonoDevelop"
# Remove bundled version of libgit2
rm installer/MonoDevelop/AddIns/VersionControl/libgit2-*
echo "Building the Installer..."
rm -rf ../bin
mkdir ../bin
../makeself/makeself.sh installer/ ../bin/monodevelop.run "MonoDevelop .run installer" ./postinstall.sh
echo "Cleaning Up..."
cd ..
rm -rf tmp
echo "Done :)"