updated on Sat Jan 21 04:00:54 UTC 2012
[aur-mirror.git] / ultimatepp / doinstall
blob5e76a4b04dbc93c0dfe765fb731958815bf9ed14
1 #!/bin/bash
3 appdir=/usr/share/ultimatepp
4 destdir=$1$appdir
6 # Copy the stuffs
7 mkdir -p $destdir
8 mkdir -p $1/usr/bin
9 mkdir -p $1/usr/share/pixmaps
10 mkdir -p $1/usr/share/applications
11 cp -r uppsrc $destdir
12 cp -r examples $destdir
13 cp -r bazaar $destdir
14 cp -r tutorial $destdir
15 cp -r reference $destdir
16 cp $destdir/uppsrc/ide.out $1/usr/bin/theide
17 cp GCC.bm $destdir/GCC.bm
18 rm -r $destdir/uppsrc/_out
20 # Place the application icon
21 cp $destdir/uppsrc/ide/icon16x16.png $1/usr/share/pixmaps/theide.png
23 # Create the launcher script
25 cat > $1/usr/bin/upp << EOF
26 #!/bin/bash
28 if [ ! -d \${HOME}/.upp ]; then
29 mkdir \${HOME}/.upp
30 mkdir \${HOME}/.upp/theide
31 mkdir \${HOME}/.upp/out
32 mkdir \${HOME}/.upp/MyApps
33 cp /usr/share/ultimatepp/GCC.bm \${HOME}/.upp/theide/GCC.bm
35 echo UPP = \"${appdir}/uppsrc\"\;OUTPUT = \"\${HOME}/.upp/out\"\; > \${HOME}/.upp/theide/uppsrc.var
36 echo UPP = \"${appdir}/examples\;${appdir}/uppsrc\"\;OUTPUT = \"\${HOME}/.upp/out\"\; > \${HOME}/.upp/theide/examples.var
37 echo UPP = \"${appdir}/reference\;${appdir}/uppsrc\"\;OUTPUT = \"\${HOME}/.upp/out\"\; > \${HOME}/.upp/theide/reference.var
38 echo UPP = \"${appdir}/tutorial\;${appdir}/uppsrc\"\;OUTPUT = \"\${HOME}/.upp/out\"\; > \${HOME}/.upp/theide/tutorial.var
39 echo UPP = \"${appdir}/bazaar\;${appdir}/uppsrc\"\;OUTPUT = \"\${HOME}/.upp/out\"\; > \${HOME}/.upp/theide/bazaar.var
40 echo UPP = \"\${HOME}/MyApps\;${appdir}/uppsrc\"\;OUTPUT = \"\${HOME}/.upp/out\"\; > \${HOME}/.upp/theide/MyApps.var
43 theide
45 EOF
46 chmod 755 $1/usr/bin/upp
48 # Create the desktop file
49 cat > $1/usr/share/applications/ultimatepp.desktop << EOF
50 [Desktop Entry]
51 Version=1.0
52 Name=Ultimate++
53 Type=Application
54 Categories=Development;IDE;
55 Terminal=false
56 Exec=upp
57 Icon=/usr/share/pixmaps/theide.png
58 EOF