Welcome to mirror list, hosted at ThFree Co, Russian Federation.

get-server-sources.sh « build - github.com/nextcloud/documentation.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2ceb058fc07e049661117d87beaaf9b731998bb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
#
# Clone Nextcloud server repo into $CWD/server
# if it already exists the latest commits from 
# the specified branch will be fetched

NC_BRANCH="${1:-master}"

printf "\n\n"
echo Fetching source for $NC_BRANCH
printf "\n"

if [ -d server/.git ]; then
    cd server
    git remote set-branches --add origin $NC_BRANCH
    git fetch
    git checkout $NC_BRANCH
    git reset --hard origin/$NC_BRANCH 
else
    git clone https://github.com/nextcloud/server server --depth 1 --branch $NC_BRANCH
fi;