-
Notifications
You must be signed in to change notification settings - Fork 1
/
solt_repo
executable file
·78 lines (70 loc) · 1.66 KB
/
solt_repo
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
72
73
74
75
76
77
78
#!/bin/bash
# Load all the basch scripts
for file in /usr/share/solt/*; do
source /usr/share/solt/solt_common
source /usr/share/solt/solt_log
source /usr/share/solt/solt_functions
done
if [ -f "/etc/solt/solt.conf" ]; then
source /etc/solt/solt.conf
fi
# Create a repo package
function _create_repo {
_file_check $build_dir/$reponame
mkdir -p $build_dir/$reponame
cd $build_dir/$reponame
_show_request "Please enter package source url"
read URL
$common_dir/$yauto_path ${URL}
git init;
_create_makefile
_show_confirm "Makefile created"
_exec_shell
}
# Update a repo
function _update_repo {
_file_check $build_dir/$reponame
cd $build_dir
make $reponame.clone
cd $reponame
_show_request "Please enter new version no and url"
read VERSION URL
python $yupdate_path ${VERSION} ${URL}
_exec_shell
}
# Clone a repo
function _clone_repo {
_file_check $build_dir/$reponame
cd $build_dir
make $reponame.clone
cd $reponame
_exec_shell
}
# Clone and bump a repo
function _bump_repo {
_file_check $build_dir/$reponame
cd $build_dir
make $reponame.clone
cd $reponame
make bump
_exec_shell
}
# Clone a Diff for a repo
function _diff_repo {
_clonefolder_check
cd $clone_dir
make $reponame.clone
cd $reponame
arc patch $diff
_exec_shell
}
# Clone an initial diff
function _initial_repo {
_file_check $build_dir/$reponame
mkdir -p $build_dir/$reponame
cd $build_dir/$reponame
git init
git commit -s -m "Test repo" --allow-empty
arc patch $diff
_exec_shell
}