2024-08-18 02:13:35 +07:00
|
|
|
#!/usr/bin/env ash
|
2024-08-31 22:36:41 +07:00
|
|
|
#
|
2024-10-05 23:07:45 +07:00
|
|
|
# Copyright (C) 2024 AuxXxilium <https://github.com/AuxXxilium>
|
2024-08-31 22:36:41 +07:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the MIT License.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
2024-08-18 02:13:35 +07:00
|
|
|
if [ "${1}" = "late" ]; then
|
2024-08-19 05:03:13 +07:00
|
|
|
echo "Installing addon sspatch - ${1}"
|
|
|
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
2024-11-09 01:34:54 +07:00
|
|
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
2024-08-19 05:03:13 +07:00
|
|
|
|
2024-11-09 01:34:54 +07:00
|
|
|
cp -pf "/usr/bin/sspatch.sh" "/tmpRoot/usr/bin/sspatch.sh"
|
2024-11-01 17:44:27 +07:00
|
|
|
|
2024-11-09 01:34:54 +07:00
|
|
|
cp -pf "/usr/lib/sspatch.tgz" "/tmpRoot/usr/arc/sspatch.tgz"
|
|
|
|
cp -pf "/usr/lib/sspatch-openvino.tgz" "/tmpRoot/usr/arc/sspatch-openvino.tgz"
|
|
|
|
cp -pf "/usr/lib/sspatch-3221.tgz" "/tmpRoot/usr/arc/sspatch-3221.tgz"
|
2024-09-01 02:21:38 +07:00
|
|
|
|
|
|
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
|
|
|
DEST="/tmpRoot/usr/lib/systemd/system/sspatch.service"
|
2024-11-20 16:51:12 +07:00
|
|
|
{
|
|
|
|
echo "[Unit]"
|
|
|
|
echo "Description=addon sspatch"
|
|
|
|
echo "After=multi-user.target"
|
|
|
|
echo
|
|
|
|
echo "[Service]"
|
|
|
|
echo "Type=oneshot"
|
|
|
|
echo "RemainAfterExit=yes"
|
|
|
|
echo "ExecStart=/usr/bin/sspatch.sh"
|
|
|
|
echo
|
|
|
|
echo "[Install]"
|
|
|
|
echo "WantedBy=multi-user.target"
|
|
|
|
} >"${DEST}"
|
2024-11-09 01:34:54 +07:00
|
|
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
2024-09-01 02:21:38 +07:00
|
|
|
ln -vsf /usr/lib/systemd/system/sspatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/sspatch.service
|
2024-08-18 02:13:35 +07:00
|
|
|
elif [ "${1}" = "uninstall" ]; then
|
|
|
|
echo "Installing addon sspatch - ${1}"
|
|
|
|
# To-Do
|
|
|
|
fi
|