Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-shell
Commits
cc193ea4
Commit
cc193ea4
authored
Oct 28, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #90 from Razer6/optional_repo_path
Add optional repo path, remove reference to gitolite repo
parents
ff33e05b
3b77882e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
support/truncate_repositories.sh
support/truncate_repositories.sh
+8
-3
No files found.
support/truncate_repositories.sh
View file @
cc193ea4
#!/bin/bash
home_dir
=
"/home/git"
# $1 is an optional argument specifying the location of the repositories directory.
# Defaults to /home/git/repositories if not provided
home_dir
=
"/home/git/repositories"
src
=
${
1
:-
"
$home_dir
"
}
echo
"Danger!!! Data Loss"
while
true
;
do
read
-p
"Do you wish to delete all directories
(except gitolite-admin.git) from
$home_dir
/repositories
/ (y/n) ?: "
yn
read
-p
"Do you wish to delete all directories
from
$home_dir
/ (y/n) ?: "
yn
case
$yn
in
[
Yy]
*
)
sh
-c
"find
$home_dir
/
repositories/. -maxdepth 1 -not -name 'gitolite-admin.git'
-not -name '.' | xargs rm -rf"
;
break
;;
[
Yy]
*
)
sh
-c
"find
$home_dir
/
. -maxdepth 1
-not -name '.' | xargs rm -rf"
;
break
;;
[
Nn]
*
)
exit
;;
*
)
echo
"Please answer yes or no."
;;
esac
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment