Skip to content

Commit 7e6cd65

Browse files
committed
Update scripts
1 parent 982645a commit 7e6cd65

File tree

4 files changed

+40
-6
lines changed

4 files changed

+40
-6
lines changed
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
#/bin/env sh
22

3+
echo 'Downloading alpine minimal root filesystem'
4+
35
mkdir -p /data/storage/el2/base/temp
46
cd /data/storage/el2/base/temp
7+
rm -f alpine-minirootfs.tar.gz
58
wget https://dl-cdn.alpinelinux.org/alpine/v3.22/releases/aarch64/alpine-minirootfs-3.22.1-aarch64.tar.gz -O alpine-minirootfs.tar.gz
9+
echo 'Done.'
610

7-
rm -rf /data/storage/el2/base/files/alpine
8-
mkdir /data/storage/el2/base/files/alpine
11+
echo 'Preparing alpine minimal root filesystem'
12+
rm -rf /data/storage/el2/base/files/alpine_aarch64
13+
mkdir /data/storage/el2/base/files/alpine_aarch64
914

1015
cd /data/storage/el2/base/files
11-
tar xvf /data/storage/el2/base/temp/alpine-minirootfs.tar.gz -C alpine
16+
tar xvf /data/storage/el2/base/temp/alpine-minirootfs.tar.gz -C alpine_aarch64
1217

13-
echo 'Done'
18+
echo 'Alpine root filesystem installed to /data/storage/el2/base/files/alpine_aarch64'
19+
echo 'You can run harmonix_run_alpine to start.'
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
#/bin/env sh
2-
rm -rf /data/storage/el2/base/files/alpine
2+
3+
echo 'Will remove alpine root filesystem at /data/storage/el2/base/files/alpine_aarch64'
4+
echo 'Press any key to continue, or Ctrl+C to break'
5+
read -n 1 key
6+
7+
rm -rf /data/storage/el2/base/files/alpine_aarch64
8+
9+
echo 'Alpine root filesystem at /data/storage/el2/base/files/alpine_aarch64 has been removed.'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#/bin/env sh
2-
cd /data/storage/el2/base/files/alpine
2+
cd /data/storage/el2/base/files/alpine_aarch64
33
qemu-harmonix-aarch64 -E PATH=/bin:/sbin:/usr/bin -E HOME=/root -L . ./bin/busybox sh -c 'cd ~ && sh'

sign-hap.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
if [[ ! -n ${TOOL_HOME} ]]; then
4+
echo """\$TOOL_HOME IS NOT DEFINED, PLS SPECIFIY A CORRECT DIR!
5+
You can download HarmonyOS Commandline Tools form
6+
https://developer.huawei.com/consumer/cn/download/
7+
"""
8+
exit 1
9+
fi
10+
11+
export PATH=$TOOL_HOME/bin:$PATH
12+
export PATH=$TOOL_HOME/tool/node/bin:$PATH
13+
14+
# Check for required arguments
15+
if [ "$#" -ne 2 ]; then
16+
echo "Usage: $0 <input-unsigned.hap> <output-signed.hap>"
17+
exit 1
18+
fi
19+
20+
# Run the Python script with the provided arguments
21+
python3 sign.py "$1" "$2"

0 commit comments

Comments
 (0)