mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
Organizing for automation
This commit is contained in:
parent
6d61c4dc7b
commit
fb113ea435
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
@ -2,6 +2,10 @@ name: Build img
|
|||||||
|
|
||||||
# Controls when the workflow will run
|
# Controls when the workflow will run
|
||||||
on:
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the "main" branch
|
||||||
|
# push:
|
||||||
|
# pull_request:
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
@ -31,7 +35,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
VERSION=`<VERSION`
|
VERSION=`<VERSION`
|
||||||
echo "::set-output name=VERSION::$VERSION"
|
echo "::set-output name=VERSION::$VERSION"
|
||||||
./compile-lkm.sh
|
|
||||||
./img-gen.sh
|
./img-gen.sh
|
||||||
|
|
||||||
# Upload img
|
# Upload img
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
TMP_PATH="/tmp"
|
|
||||||
DEST_PATH="files/board/arpl/p3/lkms"
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
function trap_cancel() {
|
|
||||||
echo "Press Control+C once more terminate the process (or wait 2s for it to restart)"
|
|
||||||
sleep 2 || exit 1
|
|
||||||
}
|
|
||||||
trap trap_cancel SIGINT SIGTERM
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
function die() {
|
|
||||||
echo -e "\033[1;31m$@\033[0m"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Main
|
|
||||||
while read PLATFORM KVER; do
|
|
||||||
# Compile using docker
|
|
||||||
docker run --rm -t --user `id -u` -v "${TMP_PATH}":/output \
|
|
||||||
-v "${PWD}/redpill-lkm":/input fbelavenuto/syno-compiler compile-lkm ${PLATFORM}
|
|
||||||
mv "${TMP_PATH}/redpill-dev.ko" "${DEST_PATH}/rp-${PLATFORM}-${KVER}-dev.ko"
|
|
||||||
mv "${TMP_PATH}/redpill-prod.ko" "${DEST_PATH}/rp-${PLATFORM}-${KVER}-prod.ko"
|
|
||||||
done < PLATFORMS
|
|
@ -502,7 +502,6 @@ function addonMenu() {
|
|||||||
;;
|
;;
|
||||||
o) dialog --backtitle "`backtitle`" \
|
o) dialog --backtitle "`backtitle`" \
|
||||||
--inputbox "please enter the URL to download" 0 0 \
|
--inputbox "please enter the URL to download" 0 0 \
|
||||||
"https://raw.githubusercontent.com/fbelavenuto/arpl-addons/main/" \
|
|
||||||
2>${TMP_PATH}/resp
|
2>${TMP_PATH}/resp
|
||||||
[ $? -ne 0 ] && continue
|
[ $? -ne 0 ] && continue
|
||||||
URL="`<"${TMP_PATH}/resp"`"
|
URL="`<"${TMP_PATH}/resp"`"
|
||||||
|
@ -27,12 +27,12 @@ unzip /tmp/rp-lkms.zip -d files/board/arpl/p3/lkms
|
|||||||
echo "Getting latest Addons"
|
echo "Getting latest Addons"
|
||||||
TAG=`curl -s https://api.github.com/repos/fbelavenuto/arpl-addons/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
TAG=`curl -s https://api.github.com/repos/fbelavenuto/arpl-addons/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
||||||
curl -L "https://github.com/fbelavenuto/arpl-addons/releases/download/${TAG}/addons.zip" -o /tmp/addons.zip
|
curl -L "https://github.com/fbelavenuto/arpl-addons/releases/download/${TAG}/addons.zip" -o /tmp/addons.zip
|
||||||
rm -rf addons
|
rm -rf /tmp/addons
|
||||||
mkdir -p addons
|
mkdir -p /tmp/addons
|
||||||
unzip /tmp/addons.zip -d addons
|
unzip /tmp/addons.zip -d /tmp/addons
|
||||||
DEST_PATH="files/board/arpl/p3/addons"
|
DEST_PATH="files/board/arpl/p3/addons"
|
||||||
echo "Installing addons to ${DEST_PATH}"
|
echo "Installing addons to ${DEST_PATH}"
|
||||||
for PKG in `ls addons/*.addon`; do
|
for PKG in `ls /tmp/addons/*.addon`; do
|
||||||
ADDON=`basename ${PKG} | sed 's|.addon||'`
|
ADDON=`basename ${PKG} | sed 's|.addon||'`
|
||||||
mkdir -p "${DEST_PATH}/${ADDON}"
|
mkdir -p "${DEST_PATH}/${ADDON}"
|
||||||
echo "Extracting ${PKG} to ${DEST_PATH}/${ADDON}"
|
echo "Extracting ${PKG} to ${DEST_PATH}/${ADDON}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user