File: install.sh

package info (click to toggle)
wfview 2.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,256 kB
  • sloc: cpp: 43,386; ansic: 3,196; sh: 32; xml: 29; makefile: 11
file content (41 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download | duplicates (2)
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
#!/bin/bash
echo "This script copies the following items into your system:" 
echo ""
echo "icon: unix_icons/wfview.png to /usr/share/icons/hicolor/256x256/apps/"
echo "wfview application to /usr/local/bin/"
echo "wfview.desktop to /usr/share/applications/"
echo "org.wfview.wfview.metainfo.xml metadata file to /usr/share/metainfo/"
echo "qdarkstyle stylesheet to /usr/share/wfview/stylesheets/"

echo ""
echo "This script MUST be run from the build directory. Do not run it from the source directory!"
echo ""

if ! [ $(id -u) = 0 ]; then
   echo "This script must be run as root."
   echo "example: sudo $0"
   exit 1
fi


read -p "Do you wish to continue? (Y/N): " -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
    exit 1
fi

# Now the actual install: 
echo ""
echo "Copying files now."
echo ""

cp wfview /usr/local/bin/wfview
cp wfview.desktop /usr/share/applications/
cp unix_icons/wfview.png /usr/share/icons/hicolor/256x256/apps/
cp org.wfview.wfview.metainfo.xml /usr/share/metainfo/
mkdir -p /usr/share/wfview/stylesheets
cp -r qdarkstyle /usr/share/wfview/stylesheets/
cp -r rigs /usr/share/wfview/
echo ""
echo "Done!"