mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
22 lines
387 B
Bash
Executable File
22 lines
387 B
Bash
Executable File
#!/bin/bash
|
|
|
|
REPO=${REPO:-"/usr/local/bin/repo"}
|
|
|
|
function repo_init() {
|
|
mkdir -p $TUNASYNC_WORKING_DIR
|
|
cd $TUNASYNC_WORKING_DIR
|
|
$REPO init -u https://android.googlesource.com/mirror/manifest --mirror
|
|
}
|
|
|
|
function repo_sync() {
|
|
cd $TUNASYNC_WORKING_DIR
|
|
$REPO sync -f
|
|
}
|
|
|
|
if [ ! -d "$TUNASYNC_WORKING_DIR/git-repo.git" ]; then
|
|
echo "Initializing AOSP mirror"
|
|
repo_init
|
|
fi
|
|
|
|
repo_sync
|