Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mySetting
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
zhangxuantong@ihep.ac.cn
mySetting
Commits
19899f3a
Commit
19899f3a
authored
6 months ago
by
root
Browse files
Options
Downloads
Patches
Plain Diff
add remote bootstrap
parent
cec1edfc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
bootstrap.sh
+2
-2
2 additions, 2 deletions
bootstrap.sh
bootstrap_remote.sh
+13
-0
13 additions, 0 deletions
bootstrap_remote.sh
delete_legacy.sh
+0
-5
0 additions, 5 deletions
delete_legacy.sh
with
16 additions
and
7 deletions
.gitignore
+
1
−
0
View file @
19899f3a
src/proxy_pwd
src/hostlist.txt
This diff is collapsed.
Click to expand it.
bootstrap.sh
+
2
−
2
View file @
19899f3a
...
...
@@ -41,12 +41,12 @@ function setVim(){
echo
-e
"
\e
[32mConfiguring Vim...
\e
[0m"
if
[[
!
-f
~/.vim/autoload/plug.vim
]]
;
then
wget
-q
-P
~/.vim/autoload/ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim
-c
PlugUpdate
-c
PlugClean
-c
qa
vim
-E
-s
-c
PlugUpdate
-c
PlugClean
-c
qa
else
if
[[
$(
ls
-l
~/.vim/autoload/plug.vim |
awk
'{print $5}'
)
-eq
0
]]
;
then
wget
-q
-P
~/.vim/autoload/ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
vim
-c
PlugUpgrade
-c
PlugUpdate
-c
PlugClean
-c
qa
vim
-E
-s
-c
PlugUpgrade
-c
PlugUpdate
-c
PlugClean
-c
qa
fi
yes
|
cp
-f
$PWD
/src/vimrc_base ~/.env/vimrc_base &>/dev/null
if
!
grep
"source ~/.env/vimrc_base"
~/.vimrc &>/dev/null
;
then
echo
-e
"source ~/.env/vimrc_base"
>>
~/.vimrc
;
fi
...
...
This diff is collapsed.
Click to expand it.
bootstrap_remote.sh
0 → 100755
+
13
−
0
View file @
19899f3a
#!/bin/bash
remote_command
=
"cd ~; git -C .mysetting pull || git clone https://code.ihep.ac.cn/zhangxuantong/mysetting.git .mysetting; cd .mysetting; source bootstrap.sh git;"
host_list
=
"src/hostlist.txt"
while
IFS
=
read
-r
remote_host
do
if
[[
"
${
remote_host
:0:1
}
"
!=
"#"
]]
;
then
echo
"Executing on
$remote_host
..."
ssh-copy-id root@
$remote_host
&>/dev/null
ssh root@
$remote_host
"
$remote_command
"
echo
"Finished
$remote_host
..."
fi
done
<
$host_list
This diff is collapsed.
Click to expand it.
delete_legacy.sh
deleted
100755 → 0
+
0
−
5
View file @
cec1edfc
#!/bin/bash
sed
-i
"/source ~
\/
.bashrc_mysetting/d"
~/.bashrc
sed
-i
"/source ~
\/
.vimrc_mysetting/d"
~/.vimrc
rm
-f
~/.bashrc_mysetting
rm
-f
~/.vimrc_mysetting
\ No newline at end of file
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