mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
Dire Wolf - Initial installation script for Dire Wolf
This commit is contained in:
Executable
+61
@@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 27 March 2023
|
||||
# Updated : 13 October 2024
|
||||
# Purpose : Install Dire Wolf
|
||||
set -e
|
||||
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
||||
trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
|
||||
|
||||
. ./env.sh
|
||||
|
||||
VERSION=1.6
|
||||
TARBALL=direwolf-$VERSION.tar.gz
|
||||
INSTALL_DIR=/opt/direwolf-$VERSION
|
||||
LINK_PATH=/opt/direwolf
|
||||
|
||||
et-log "Installing Dire Wolf build dependencies..."
|
||||
apt install \
|
||||
gcc \
|
||||
g++ \
|
||||
make \
|
||||
cmake \
|
||||
libasound2-dev \
|
||||
libudev-dev \
|
||||
-y
|
||||
|
||||
if [ ! -e $ET_DIST_DIR/$TARBALL ]; then
|
||||
|
||||
URL=https://github.com/wb2osz/direwolf/archive/refs/tags/${VERSION}.tar.gz
|
||||
|
||||
et-log "Downloading Dire Wolf version: $URL"
|
||||
curl -s -L -o $TARBALL --fail $URL
|
||||
|
||||
[ ! -e $ET_DIST_DIR ] && mkdir $ET_DIST_DIR
|
||||
[ ! -e $ET_SRC_DIR ] && mkdir $ET_SRC_DIR
|
||||
|
||||
mv -v $TARBALL $ET_DIST_DIR
|
||||
fi
|
||||
|
||||
CWD_DIR=`pwd`
|
||||
|
||||
cd $ET_SRC_DIR
|
||||
tar -xzf $ET_DIST_DIR/$TARBALL && cd direwolf-$VERSION
|
||||
|
||||
[ ! -e $INSTALL_DIR ] && mkdir -v $INSTALL_DIR
|
||||
|
||||
[ -e build ] && rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR ..
|
||||
make -j4
|
||||
make install
|
||||
make install-conf
|
||||
|
||||
[ -e $LINK_PATH ] && rm $LINK_PATH
|
||||
ln -s $INSTALL_DIR $LINK_PATH
|
||||
|
||||
stow -v -d /opt direwolf -t /usr/local
|
||||
|
||||
cd $CWD_DIR
|
||||
|
||||
+3
-1
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 16 March 2024
|
||||
# Updated : 9 October 2024
|
||||
# Updated : 13 October 2024
|
||||
# Purpose : Main installer for EmComm Tools OS Community
|
||||
|
||||
. ./env.sh
|
||||
@@ -34,3 +34,5 @@ exitIfNotRoot
|
||||
./install-cat.sh
|
||||
|
||||
./install-conky.sh
|
||||
|
||||
./install-direwolf.sh
|
||||
|
||||
Reference in New Issue
Block a user