File: install.sh

package info (click to toggle)
dir2ogg 0.12-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 132 kB
  • ctags: 37
  • sloc: python: 475; sh: 30; makefile: 12
file content (37 lines) | stat: -rwxr-xr-x 659 bytes parent folder | download | duplicates (3)
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
#!/bin/bash

if [ "$UID" -ne 0 ]
then
   echo "You are not root: terminating"
   exit 2
fi

if [ -e "/usr/bin/dir2ogg" ]
then
   echo "/usr/bin/dir2ogg exists! Overwrite? (y/n): "
   read answ
   if [ $answ == "n" ]
   then
      exit 1
   fi
fi
cp dir2ogg /usr/bin/dir2ogg
chown root:root /usr/bin/dir2ogg
chmod 755 /usr/bin/dir2ogg

if [ -e "/usr/man/man1/dir2ogg.1" ]
then
   echo "/usr/man/man1/dir2ogg.1 exists! Overwrite? (y/n): "
   read answ
   if [ $answ == "n" ]
   then
      exit 1
   fi
fi
cp dir2ogg.1 /usr/man/man1/dir2ogg.1
chown root:root /usr/man/man1/dir2ogg.1
chmod 644 /usr/man/man1/dir2ogg.1


echo "dir2ogg is now installed. Enjoy..."