Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Dec 13, 2023
1 parent 742b12d commit 597bd33
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion waydroid-build-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,22 @@ sudo waydroid shell -- am force-stop com.termux
# Install openssh in Termux
sudo waydroid shell -- run-as com.termux sh -c "echo 'apt update && touch 1 && apt dist-upgrade -o Dpkg::Options::=--force-confnew -y && touch 2 && apt update && touch 3 && apt install openssh -yqq && touch 4' > /data/data/com.termux/files/home/.bashrc"
sudo waydroid shell -- am start -n com.termux/com.termux.app.TermuxActivity
sleep 60

check_file_exists() {
local path="$1"
local counter=0
while ! sudo waydroid shell -- run-as com.termux sh test -e $path; do
sleep 10s
counter=$[counter+1]
echo "Wait $counter time(s) for $path exists"
done
}

check_file_exists /data/data/com.termux/files/home/1
check_file_exists /data/data/com.termux/files/home/2
check_file_exists /data/data/com.termux/files/home/3
check_file_exists /data/data/com.termux/files/home/4

sudo waydroid shell -- am force-stop com.termux

# Generate ssh-key for Termux
Expand Down

0 comments on commit 597bd33

Please sign in to comment.