Skip to content

Commit c3966cc

Browse files
authored
Merge pull request #9 from lin1328/main
Adjust some of the logic
2 parents c2ada03 + ac0e31c commit c3966cc

File tree

8 files changed

+271
-290
lines changed

8 files changed

+271
-290
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jobs:
6868
local os=$1
6969
local version=$2
7070
71-
sed -i "s/RURIMA_LXC_OS=\".*\"/RURIMA_LXC_OS=\"${os}\"/g" config.conf
72-
sed -i "s/RURIMA_LXC_OS_VERSION=\".*\"/RURIMA_LXC_OS_VERSION=\"${version}\"/g" config.conf
71+
sed -i "s/^RURIMA_LXC_OS=.*/RURIMA_LXC_OS=${os}/g" config.conf
72+
sed -i "s/^RURIMA_LXC_OS_VERSION=.*/RURIMA_LXC_OS_VERSION=${version}/g" config.conf
7373
7474
zip -r "../asl-${os}-${version}.zip" . -x "*.git/*" -x ".github/*"
7575

action.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
MODDIR=${0%/*}
2-
PORT=$(sed -n 's/^PORT="\([^"]*\)"/\1/p' "$MODDIR/config.conf")
3-
PID=$($MODDIR/bin/fuser "$PORT/tcp" 2>/dev/null)
2+
PORT=$(sed -n 's/^PORT=\(.*\)/\1/p' "$MODDIR/config.conf")
3+
PID=$("$MODDIR/bin/fuser" "$PORT/tcp" 2>/dev/null)
44

5-
DEV() {
5+
BETA() {
66
local PREFIX=/data/user/0/com.termux/files/usr
77
local TBIN=$PREFIX/bin
88
local BASH=$TBIN/bash
99
local TMPDIR=$PREFIX/tmp
1010
local BATE=$TMPDIR/asl.sh
1111

12-
if [ ! -d $PREFIX ]; then
12+
if [ ! -d "$PREFIX" ]; then
1313
echo "- TThe environment of Termux is abnormal"
1414
return
1515
fi
1616

17-
cp -f $MODDIR/bate.sh $BATE
18-
chmod 755 $BATE
17+
cp -f "$MODDIR/bate.sh" "$BATE"
18+
chmod 755 "$BATE"
1919

2020
echo "- It will run in Termux soon. Please make sure the network is working properly"
2121
echo "- Check whether Termux is running in the background"
@@ -55,13 +55,13 @@ update_ssh() {
5555

5656
if [ -n "$PID" ]; then
5757
printf "- Stopping container...\n\n"
58-
"$MODDIR"/container_ctrl.sh stop
58+
"$MODDIR/container_ctrl.sh" stop
5959
sed -i 's|^description=.*|description=\[ stopped🙁 \] Android Subsystem for GNU/Linux Powered by ruri|' "$MODDIR/module.prop"
6060

61-
DEV
61+
BETA
6262
else
6363
printf "- Starting up container...\n\n"
64-
"$MODDIR"/container_ctrl.sh start
64+
"$MODDIR/container_ctrl.sh" start
6565

6666
update_ssh
6767
fi

0 commit comments

Comments
 (0)