-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsync.sh
executable file
·71 lines (48 loc) · 994 Bytes
/
sync.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
ARG_CLEANSYNC_SUPPORTED=true
# get current working directory
CWD=$(pwd)
source $CWD/.configs/scripts/script-configs.sh
source $CWD/options.sh
source $FUNCS
source $FUNCS_CUSTOM
# arguments
get_arguments "$@"
# Reset back to current directory
cd $CWD
update_pkg
check_clean_sync
currentshell=$(cat /proc/$$/cmdline)
set_path $currentshell
currentshell=
update_bin
init_git_account
# check for $ROMNAME
if [ ! -d $ROMBASE ]; then
# create directories
mkdir -p $ROMBASE
# initialize repo, sync
cd $ROMBASE
repo_init
repo_init_custom
copy_additional_manifests
copy_device_manifests
repo_update
repo_sync
fi
if [ -d $ROMBASE ]; then
# Update sync (and sync again failed sync)
cd $ROMBASE
repo_reset
update_repo_manifest
copy_additional_manifests
copy_device_manifests
repo_update
repo_sync
cd $ROMBASE
# Sources envsetup to execute vendorsetup scripts
source build/envsetup.sh
# Apply custom patches
bash -x $PATCHER $CWD
fi
shutdown_system