#!/bin/bash # Temporary Install file for testing until binary installation packages are ready ### C-daemon # Pre-Cleaning sudo rm /usr/bin/cdaemontmp sudo rm -rf /usr/lib/cdaemontmp/ # Building temp_dir="$(mktemp -d)" cd $temp_dir echo $temp_dir git clone https://git.aliberksandikci.com.tr/liderahenk/go-daemon cd go-daemon/ go build -o c-daemon/bin/ c-daemon/go-files/info.go gcc -o c-daemon/bin/test c-daemon/daemon/test.c c-daemon/daemon/daemon.c # Installing cd c-daemon sudo mv ./bin/test /usr/bin/cdaemontmp sudo mkdir -p /usr/lib/cdaemontmp/ sudo mv ./bin/info /usr/lib/cdaemontmp/info sudo mv ./cdaemontmp.service /etc/systemd/system/ # Post-Cleaning # sudo rm -rf temp_dir