feat(packaging): implement packaging (.tar.gz, .deb, .rpm), FHS logging, and container integration test matrix
This commit is contained in:
1 parent
6e18bdf7b7
commit
e1a99d7e6f
20 files changed
+789
-21
No files matched your search
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Installer for Linux System Updater (.tar.gz distribution)
|
||||
PREFIX="${PREFIX:-/usr/local}"
|
||||
SYSCONFDIR="${SYSCONFDIR:-/etc}"
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "Error: Installation requires root/sudo privileges." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Installing Linux System Updater to ${PREFIX}..."
|
||||
|
||||
# Create target directories
|
||||
mkdir -p "${PREFIX}/bin"
|
||||
mkdir -p "${PREFIX}/lib/linux-updater"
|
||||
mkdir -p "${SYSCONFDIR}"
|
||||
mkdir -p /var/log/linux-updater
|
||||
chmod 750 /var/log/linux-updater || chmod 755 /var/log/linux-updater
|
||||
|
||||
# Copy package modules
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
cp -r "${SCRIPT_DIR}/linux_updater" "${PREFIX}/lib/linux-updater/"
|
||||
|
||||
# Install launcher
|
||||
install -m 755 "${SCRIPT_DIR}/bin/linux-updater" "${PREFIX}/bin/linux-updater"
|
||||
|
||||
# Install default config if not existing
|
||||
if [ ! -f "${SYSCONFDIR}/linux-updater.json" ] && [ -f "${SCRIPT_DIR}/linux-updater.json.example" ]; then
|
||||
echo "Installing default configuration to ${SYSCONFDIR}/linux-updater.json..."
|
||||
cp "${SCRIPT_DIR}/linux-updater.json.example" "${SYSCONFDIR}/linux-updater.json"
|
||||
chmod 644 "${SYSCONFDIR}/linux-updater.json"
|
||||
fi
|
||||
|
||||
echo "Installation complete! Run 'linux-updater --help' to verify."
|
||||
Reference in new issue
Block a user