-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from solution-libre/6-upgrade-to-bareos-v21
Upgrade to bareos v21
- Loading branch information
Showing
4 changed files
with
85 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env sh | ||
|
||
CWD=$(pwd) | ||
DIR='barcus-bareos' | ||
|
||
cmd_check() { | ||
cmd=$1 | ||
if ! command -v "$cmd" > /dev/null | ||
then | ||
echo "$cmd is require and could not be found. Please install it." | ||
exit | ||
fi | ||
} | ||
|
||
cmd_check 'git' | ||
|
||
if ! git filter-repo --version > /dev/null | ||
then | ||
echo "git-filter-repo is require and could not be found. Please install it." | ||
exit | ||
fi | ||
|
||
cd /tmp || exit | ||
|
||
git clone https://github.com/barcus/bareos.git "${DIR}" | ||
cd "${DIR}" || exit | ||
|
||
git remote rm origin | ||
|
||
git filter-repo --force --path LICENSE --path docker-compose-alpine-pgsql.yml | ||
|
||
git reset --hard | ||
git gc --aggressive | ||
git prune | ||
git clean -fd | ||
|
||
mkdir barcus | ||
git mv LICENSE docker-compose-alpine-pgsql.yml barcus | ||
git commit -m 'move to a subdir' | ||
|
||
cd "${CWD}" || exit | ||
|
||
git remote add barcus "/tmp/${DIR}" | ||
git merge barcus/master | ||
git reset -- LICENSE | ||
git checkout LICENSE | ||
|
||
rm -rf "/tmp/${DIR}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters