mirror of https://github.com/PentHertz/srsLTE.git
update install config script to allow installation to /etc
This commit is contained in:
parent
c88cc35fdf
commit
571963b53d
|
@ -3,8 +3,29 @@
|
||||||
# Auto-updated by CMake with actual install path
|
# Auto-updated by CMake with actual install path
|
||||||
SRSLTE_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_DIR}"
|
SRSLTE_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_DIR}"
|
||||||
|
|
||||||
# Default folder where configs go
|
# check if install mode has been provided
|
||||||
|
if ([ ! $1 ])
|
||||||
|
then
|
||||||
|
echo "Please call script with either user or service as first parameter."
|
||||||
|
echo ""
|
||||||
|
echo "E.g. ./srslte_install_configs.sh user"
|
||||||
|
echo " .. to install all config files to $HOME/.srs"
|
||||||
|
echo ""
|
||||||
|
echo "E.g. ./srslte_install_configs.sh service"
|
||||||
|
echo " .. to install all config files to /etc/srslte"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" == "user" ]
|
||||||
|
then
|
||||||
dest_folder="$HOME/.srs"
|
dest_folder="$HOME/.srs"
|
||||||
|
elif [ "$1" == "service" ]
|
||||||
|
then
|
||||||
|
dest_folder="/etc/srslte"
|
||||||
|
else
|
||||||
|
echo "Please call script with either user or service as first parameter."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
install_file(){
|
install_file(){
|
||||||
source_path="$SRSLTE_INSTALL_DIR/$1"
|
source_path="$SRSLTE_INSTALL_DIR/$1"
|
||||||
|
@ -40,6 +61,9 @@ echo "Installing srsLTE configuration files:"
|
||||||
if [ ! -d "$dest_folder" ]; then
|
if [ ! -d "$dest_folder" ]; then
|
||||||
echo " - Creating srsLTE config folder $dest_folder"
|
echo " - Creating srsLTE config folder $dest_folder"
|
||||||
mkdir $dest_folder
|
mkdir $dest_folder
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue