mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-09 11:40:26 +03:00
Add update ability for -current repo
Merge #51 Signed-off-by: Willy Sudiarto Raharjo <willysr@sbopkg.org>
This commit is contained in:
parent
3297b4aa1d
commit
5a5df8dc0a
@ -2432,6 +2432,23 @@ rsync_command() {
|
|||||||
rm -f $SYNC_LOCK
|
rm -f $SYNC_LOCK
|
||||||
}
|
}
|
||||||
|
|
||||||
|
current_check_updates() {
|
||||||
|
# This function checks for updates if repository is set to -current.
|
||||||
|
|
||||||
|
local URL BRANCH REMOTE LOCAL
|
||||||
|
|
||||||
|
eval $(sed 's/^\(.*\)@\(.*\)$/URL=\1; BRANCH=\2/g' <<< $REPO_LINK)
|
||||||
|
|
||||||
|
cd $REPO_DIR
|
||||||
|
REMOTE=$(git ls-remote $URL $BRANCH | cut -f 1)
|
||||||
|
LOCAL=$(git rev-parse HEAD)
|
||||||
|
# If the remote has changed, wipe the local version
|
||||||
|
if [[ $REMOTE != $LOCAL ]]; then
|
||||||
|
cd ..
|
||||||
|
rm -fR $REPO_DIR
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
git_command() {
|
git_command() {
|
||||||
# This function synchronizes a local git repository with upstream.
|
# This function synchronizes a local git repository with upstream.
|
||||||
|
|
||||||
@ -2441,6 +2458,12 @@ git_command() {
|
|||||||
eval $(sed 's/^\(.*\)@\(.*\)$/URL=\1; BRANCH=\2/g' <<< $REPO_LINK)
|
eval $(sed 's/^\(.*\)@\(.*\)$/URL=\1; BRANCH=\2/g' <<< $REPO_LINK)
|
||||||
|
|
||||||
CWD=$(pwd)
|
CWD=$(pwd)
|
||||||
|
# If -CURRENT, handle correctly
|
||||||
|
if [[ $REPO_NAME == "SBo-git" ]]; then
|
||||||
|
if [[ $REPO_BRANCH == "current" ]]; then
|
||||||
|
current_check_updates
|
||||||
|
fi
|
||||||
|
fi
|
||||||
# Create the repository if needed
|
# Create the repository if needed
|
||||||
if [[ ! -d $REPO_DIR/.git ]]; then
|
if [[ ! -d $REPO_DIR/.git ]]; then
|
||||||
mkdir -p $REPO_DIR
|
mkdir -p $REPO_DIR
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
SBOPKG NEWS
|
SBOPKG NEWS
|
||||||
|
|
||||||
sbopkg-dev (2018-08-20 00:09:56 UTC)
|
sbopkg-dev (2018-09-01 23:00:08 UTC)
|
||||||
FEATURES
|
FEATURES
|
||||||
* sqg: Parallelize building of single and all packages by option -j.
|
* sqg: Parallelize building of single and all packages by option -j.
|
||||||
Patch by Marcel Saegebarth.
|
Patch by Marcel Saegebarth.
|
||||||
@ -46,6 +46,8 @@ sbopkg-dev (2018-08-20 00:09:56 UTC)
|
|||||||
Patch by orbea (#42)
|
Patch by orbea (#42)
|
||||||
* Increase timeout on update detection (#43)
|
* Increase timeout on update detection (#43)
|
||||||
* sqg: Check for invalid .info files before processing.
|
* sqg: Check for invalid .info files before processing.
|
||||||
|
* Support update ability for -current repo
|
||||||
|
Patch by JK Wood, reviewed by Matteo Bernardini (51)
|
||||||
|
|
||||||
sbopkg 0.38.1 (2016-09-01 13:42 UTC)
|
sbopkg 0.38.1 (2016-09-01 13:42 UTC)
|
||||||
FEATURES
|
FEATURES
|
||||||
|
Loading…
Reference in New Issue
Block a user