-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpkg_linpac
executable file
·85 lines (75 loc) · 2.68 KB
/
pkg_linpac
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
###
### SIGPI
###
### pkg_linpac
###
case "$1" in
remove )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## Remove Linpac"
echo -e "${SIGPI_BANNER_RESET}"
sudo apt-get remove linpac
### Remove Menu icon
sudo rm $SIGPI_DESKTOP_ICONS/linpac.png
### Remove Desktop links
sudo rm $SIGPI_DESKTOP_FILES/linpac.desktop
sed -i /linpac/d $SIGPI_INSTALLED
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## Linpac Removed"
echo -e "${SIGPI_BANNER_RESET}"
;;
purge )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## Purge linpac"
echo -e "${SIGPI_BANNER_RESET}"
sudo apt-get remove --purge linpac
sed -i /linpac/d $SIGPI_INSTALLED
### Remove Menu icon
sudo rm $SIGPI_DESKTOP_ICONS/linpac.png
### Remove Desktop links
sudo rm $SIGPI_DESKTOP_FILES/linpac.desktop
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## Linpac Purged"
echo -e "${SIGPI_BANNER_RESET}"
;;
install )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ##"
echo -e "${SIGPI_BANNER_COLOR} ## Install Linpac (AX.25 terminal)"
echo -e "${SIGPI_BANNER_COLOR} ##"
echo -e "${SIGPI_BANNER_RESET}"
## DEPENDENCIES
## PACKAGE
cd $SIGPI_SOURCE
sudo apt-get install -y linpac
cat $SIGPI_PKGLIST|grep "linpac" >> $SIGPI_INSTALLED
## DESKTOP
# Add Icon
sudo cp $SIGPI_ICONS/linpac.png $DESKTOP_ICONS
# Add Desktop
sudo cp $SIGPI_HOME/desktop/linpac.desktop $DESKTOP_FILES
# Change Category
sudo sed -i "s/Categories.*/Categories=$HAMRADIO_MENU_CATEGORY;/" $DESKTOP_FILES/linpac.desktop
# Add to menu
xdg-desktop-menu install --novendor --noupdate $DESKTOP_DIRECTORY/SIGpi.directory $DESKTOP_FILES/linpac.desktop
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## Linpac Installed"
echo -e "${SIGPI_BANNER_RESET}"
;;
package )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## SIGpi package option not available"
echo -e "${SIGPI_BANNER_RESET}"
;;
build )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## SIGpi build option not available"
echo -e "${SIGPI_BANNER_RESET}"
;;
* )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## ERROR: Unkown action or package"
echo -e "${SIGPI_BANNER_RESET}"
;;
esac