-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpkg_srsran
executable file
·73 lines (62 loc) · 2.08 KB
/
pkg_srsran
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
#!/bin/bash
###
### SIGPI
###
### pkg_srsran
###
case "$1" in
remove )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## Remove srsRAN"
echo -e "${SIGPI_BANNER_RESET}"
sudo apt-get remove srsran
sed -i /srsran/d $SIGPI_INSTALLED
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## srsRAN Removed"
echo -e "${SIGPI_BANNER_RESET}"
;;
purge )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## Purge srsRAN"
echo -e "${SIGPI_BANNER_RESET}"
sudo apt-get remove --purge srsran
sed -i /srsran/d $SIGPI_INSTALLED
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## srsRAN Purged"
echo -e "${SIGPI_BANNER_RESET}"
;;
install )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ##"
echo -e "${SIGPI_BANNER_COLOR} ## Install srsRAN"
echo -e "${SIGPI_BANNER_COLOR} ##"
echo -e "${SIGPI_BANNER_RESET}"
## DEPENDENCIES
## PACKAGE
cd $SIGPI_PACKAGES
if [[ "$SIGPI_HWARCH" == "x86_64" ]]; then
cd $SIGPI_PACKAGES
sudo add-apt-repository ppa:softwareradiosystems/srsran
sudo apt-get update
sudo apt-get install srsran -y
cat $SIGPI_PKGLIST|grep "srsran" >> $SIGPI_INSTALLED
fi
if [[ "$SIGPI_HWARCH" == "aarch64" ]]; then
cd $SIGPI_PACKAGES
echo -e "Not available for ARM64"
fi
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## srsRAN Installed"
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