further improvements
This commit is contained in:
@@ -5,6 +5,12 @@ install=$HOME/.local/bin/hamclock
|
||||
gui=true
|
||||
steps=cd src, make, make hamclock-1600x960, mv hamclock-1600X960 $HOME/.local/bin/hamclock
|
||||
|
||||
[openhamclock]
|
||||
version=
|
||||
git=https://github.com/accius/openhamclock.git
|
||||
install=$HOME/.local/bin/openhamclock
|
||||
steps=npm ci, cp .env.example .env, read -rp "What is your call sign? " CALLSIGN, sed -i "s/CALLSIGN=NOCALL/CALLSIGN=$CALLSIGN/" .env, read -rp "What is the host IP address or domain name? " HOST, sed -i "s/HOST=localhost/HOST=$HOST/" .env, read -rp "What is your locator code? " LOCATOR, sed -i "s/LOCATOR=FN31/LOCATOR=$LOCATOR/" .env
|
||||
|
||||
[direwolf]
|
||||
version=1.8.1
|
||||
git=https://github.com/wb2osz/direwolf.git
|
||||
|
||||
@@ -205,7 +205,7 @@ run_steps() {
|
||||
echo " Building $app..."
|
||||
IFS=',' read -ra step_list <<< "$steps"
|
||||
for step in "${step_list[@]}"; do
|
||||
step=$(echo "$step" | xargs)
|
||||
step=$(echo "$step" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
||||
echo " Running: $step"
|
||||
eval "$step"
|
||||
done
|
||||
@@ -272,14 +272,21 @@ process_conf() {
|
||||
fi
|
||||
|
||||
local key="${line%%=*}"
|
||||
local value="${line#*=}"
|
||||
value=$(eval echo "$value")
|
||||
local raw_value="${line#*=}"
|
||||
|
||||
# Steps are stored raw so quotes and variables expand correctly at eval time
|
||||
if [ "$key" = "steps" ]; then
|
||||
steps="$raw_value"
|
||||
continue
|
||||
fi
|
||||
|
||||
local value
|
||||
value=$(eval echo "$raw_value")
|
||||
|
||||
case "$key" in
|
||||
git) git_url="$value" ;;
|
||||
wget) wget_url="$value" ;;
|
||||
install) install_path="$value" ;;
|
||||
steps) steps="$value" ;;
|
||||
version) version="$value" ;;
|
||||
desktop) desktop="$value" ;;
|
||||
gui) gui="$value" ;;
|
||||
|
||||
17
install.sh
17
install.sh
@@ -28,6 +28,11 @@ print_logo
|
||||
cd ~
|
||||
sudo -v
|
||||
|
||||
# Keep sudo session alive for the duration of the script
|
||||
( while true; do sudo -v; sleep 60; done ) &
|
||||
SUDO_KEEPALIVE_PID=$!
|
||||
trap "kill $SUDO_KEEPALIVE_PID" EXIT
|
||||
|
||||
if ! command -v git &> /dev/null; then
|
||||
echo "Installing git..."
|
||||
sudo pacman -S --noconfirm git
|
||||
@@ -89,18 +94,6 @@ install_packages "${SERVERS[@]}"
|
||||
|
||||
cd ~/.local/share/HamPackServer
|
||||
|
||||
if [ ! -d "$HOME/.nvm" ]; then
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
||||
else
|
||||
echo "nvm is already installed, skipping."
|
||||
fi
|
||||
|
||||
if ! command -v node &> /dev/null; then
|
||||
nvm install --lts
|
||||
else
|
||||
echo "Node.js is already installed, skipping."
|
||||
fi
|
||||
|
||||
if ! pacman -Qi apache &> /dev/null; then
|
||||
echo "Installing Apache..."
|
||||
sudo pacman -S --noconfirm apache
|
||||
|
||||
Reference in New Issue
Block a user