~writer-devs/writer/trunk

« back to all changes in this revision

Viewing changes to scripts/uninstall.sh

  • Committer: Anthony Huben
  • Date: 2015-04-10 17:45:22 UTC
  • Revision ID: harp37@gmail.com-20150410174522-y2g5cf1yh19s189i
Delete scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
# Check if root
4
 
SUDO=''
5
 
if [ $EUID -ne 0 ]; then
6
 
    SUDO='sudo'
7
 
fi
8
 
 
9
 
echo
10
 
echo "UNINSTALLING Writer..."
11
 
echo "======================"
12
 
echo
13
 
 
14
 
ERRORS=0
15
 
 
16
 
# Remove executable
17
 
echo 'Removing /usr/bin/writer'
18
 
$SUDO rm /usr/bin/writer
19
 
if [ $? -ne 0 ]; then
20
 
    ERRORS=$ERRORS + 1
21
 
fi
22
 
 
23
 
# Remove .desktop
24
 
echo 'Removing /usr/share/applications/writer.desktop'
25
 
$SUDO rm /usr/share/applications/writer.desktop
26
 
if [ $? -ne 0 ]; then
27
 
    ERRORS=$ERRORS + 1
28
 
fi
29
 
 
30
 
 
31
 
 
32
 
if [ $ERRORS -eq 0 ]; then
33
 
    echo
34
 
    echo 'Writer successfully uninstalled!'
35
 
    echo 'Please log out and back in again for the changes to take effect'
36
 
    exit 0
37
 
else
38
 
    echo
39
 
    echo 'Writer was NOT uninstalled successfully!'
40
 
    echo "$ERRORS errors occurred!"
41
 
    exit 1
42
 
fi
43
 
    
44
 
    
45
 
    
46
 
    
47
 
    
48
 
    
49
 
    
 
 
b'\\ No newline at end of file'