forked from imjyotiraditya/QCM6490
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·31 lines (25 loc) · 905 Bytes
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
BUILD_ROOT="$PWD"
QSSI_ROOT="${BUILD_ROOT}/LA.QSSI.13.0"
VENDOR_ROOT="${BUILD_ROOT}/LA.UM.9.14.1"
function sync_repo {
mkdir -p "$1" && cd "$1"
echo "[+] Changed directory to $1."
if repo init --depth=1 -q -u https://github.com/QRD-Development/QCM6490_BSP_Sync.git -b LA.UM.9.14.1 -m "$2"; then
echo "[+] Repo initialized successfully."
else
echo "[-] Error: Failed to initialize repo."
exit 1
fi
echo "[+] Starting repo sync..."
if schedtool -B -e ionice -n 0 repo sync -q -c --force-sync --optimized-fetch --no-tags --retry-fetches=5 -j"$(nproc --all)"; then
echo "[+] Repo synced successfully."
else
echo "[-] Error: Failed to sync repo."
exit 1
fi
}
sync_repo "$QSSI_ROOT" "qssi.xml"
sync_repo "$VENDOR_ROOT" "target.xml"
cd "$BUILD_ROOT"
echo "[+] Successfully returned to the build root."