summaryrefslogtreecommitdiff
path: root/script/convert64.sh
blob: a28d3e9bf2fcb88d93b080cdca2cb526151677a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#/bin/bash

# xml Converter
find ./ \( -name "*-rs.xml" ! -iname "setup-rs.xml" \) \
-exec xmlstarlet ed -L -u //rootstrap/emulator/rpm/@arch -v "x86_64" {} \; \
-exec xmlstarlet ed -L -u //rootstrap/target/rpm/@arch -v "aarch64" {} \; \
-exec xmlstarlet ed -L -u //rootstrap/library_path -v "/usr/lib64" {} \; \
-exec sed -i "s@<file>/usr/lib/@<file>/usr/lib64/@" {} \; \
-exec sed -i "s@<file>/lib/@<file>/lib64/@" {} \; \
-exec sed -i "s@<include_path>/usr/lib/@<include_path>/usr/lib64/@" {} \;

# rs-config
BASE_URL_POSTFIX_TARGET="/repos/standard/packages/"
BASE_URL_POSTFIX_EMULATOR="/repos/standard/packages/"

sed -i "s@BASE_URL_POSTFIX_TARGET=.*@BASE_URL_POSTFIX_TARGET=\"${BASE_URL_POSTFIX_TARGET}\"@" rs-config
sed -i "s@BASE_URL_POSTFIX_EMULATOR=.*@BASE_URL_POSTFIX_EMULATOR=\"${BASE_URL_POSTFIX_EMULATOR}\"@" rs-config

SNAPSHOT_URL_POSTFIX_EMULATOR="/repos/emulator/packages/"
SNAPSHOT_URL_POSTFIX_TARGET="/repos/standard/packages/"

sed -i "s@SNAPSHOT_URL_POSTFIX_EMULATOR=.*@SNAPSHOT_URL_POSTFIX_EMULATOR=\"${SNAPSHOT_URL_POSTFIX_EMULATOR}\"@" rs-config
sed -i "s@SNAPSHOT_URL_POSTFIX_TARGET=.*@SNAPSHOT_URL_POSTFIX_TARGET=\"${SNAPSHOT_URL_POSTFIX_TARGET}\"@" rs-config