Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
bfa480ef
Unverified
Commit
bfa480ef
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Preamble actually isn't needed
variables come from the calling script
parent
c14f73af
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-utils-git
+0
-43
0 additions, 43 deletions
src/freedombone-utils-git
with
0 additions
and
43 deletions
src/freedombone-utils-git
+
0
−
43
View file @
bfa480ef
...
...
@@ -28,49 +28,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
NO_OF_ARGS
=
$#
PROJECT_NAME
=
'freedombone'
export
TEXTDOMAIN
=
$PROJECT_NAME
-utils-git
export
TEXTDOMAINDIR
=
"/usr/share/locale"
# An optional configuration file which overrides some of these variables
CONFIGURATION_FILE
=
"
${
PROJECT_NAME
}
.cfg"
if
[
-f
~/
${
PROJECT_NAME
}
.cfg
]
;
then
CONFIGURATION_FILE
=
~/
${
PROJECT_NAME
}
.cfg
fi
# friends repo mirrors
FRIENDS_MIRRORS_SERVER
=
FRIENDS_MIRRORS_PASSWORD
=
FRIENDS_MIRRORS_SSH_PORT
=
function
get_friends_servers
{
if
[
-f
$CONFIGURATION_FILE
]
;
then
if
grep
-q
"FRIENDS_MIRRORS_SERVER"
$CONFIGURATION_FILE
;
then
FRIENDS_MIRRORS_SERVER
=
$(
grep
"FRIENDS_MIRRORS_SERVER"
$CONFIGURATION_FILE
|
awk
-F
'='
'{print $2}'
)
fi
if
grep
-q
"FRIENDS_MIRRORS_PASSWORD"
$CONFIGURATION_FILE
;
then
FRIENDS_MIRRORS_PASSWORD
=
$(
grep
"FRIENDS_MIRRORS_PASSWORD"
$CONFIGURATION_FILE
|
awk
-F
'='
'{print $2}'
)
fi
if
grep
-q
"FRIENDS_MIRRORS_SSH_PORT"
$CONFIGURATION_FILE
;
then
FRIENDS_MIRRORS_SSH_PORT
=
$(
grep
"FRIENDS_MIRRORS_SSH_PORT"
$CONFIGURATION_FILE
|
awk
-F
'='
'{print $2}'
)
fi
fi
if
[
!
$FRIENDS_MIRRORS_SERVER
]
;
then
echo
"1"
return
fi
if
[
${#
FRIENDS_MIRRORS_SERVER
}
-lt
2
]
;
then
echo
"1"
return
fi
echo
"0"
}
function
git_clone
{
repo_url
=
"
$1
"
destination_dir
=
"
$2
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment