mirror of
https://github.com/eftechcombr/bacula.git
synced 2025-08-25 14:51:14 +00:00
Build 13.0.3
This commit is contained in:
31
docker/bacula-fd/scripts/backup-github.sh
Normal file
31
docker/bacula-fd/scripts/backup-github.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
# Update by Eduardo Fraga <eduardo@eftech.com.br> at 27 Dec 2022
|
||||
#
|
||||
#
|
||||
# Required: git
|
||||
|
||||
# Required environment variables above:
|
||||
if [ -z $USERNAME ] || [ -z $TOKEN ] || [ -z $ORG ]; then
|
||||
echo "Missing environmet variables USERNAME, TOKEN, ORG"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Args
|
||||
if [ -z $1 ] || [ -z $2 ]; then
|
||||
echo "Required $0 <repo> <destdir>"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
DIR=`mktemp -d`
|
||||
|
||||
cd $DIR
|
||||
|
||||
git clone https://$USERNAME:$TOKEN@github.com/$ORG/$1
|
||||
|
||||
cd $1
|
||||
|
||||
git bundle create $2 --all
|
||||
|
||||
git bundle verify $2 || exit 3
|
||||
|
||||
rm -rf $DIR
|
Reference in New Issue
Block a user