mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-07-08 10:00:31 +08:00
feat(riot): *.batch
This commit is contained in:
parent
1b32deeea1
commit
7946656a7e
@ -1,5 +1,28 @@
|
|||||||
#!/bin/false
|
#!/bin/false
|
||||||
|
|
||||||
|
# batches
|
||||||
|
nasps.batch() {
|
||||||
|
remotes+=(
|
||||||
|
g1.nasp
|
||||||
|
g2.nasp
|
||||||
|
g3.nasp
|
||||||
|
g4.nasp
|
||||||
|
g5.nasp
|
||||||
|
g6.nasp
|
||||||
|
g7.nasp
|
||||||
|
g8.nasp
|
||||||
|
g9.nasp
|
||||||
|
g10.nasp
|
||||||
|
g11.nasp
|
||||||
|
g12.nasp
|
||||||
|
g13.nasp
|
||||||
|
g14.nasp
|
||||||
|
dictxiong@g15.nasp
|
||||||
|
dictxiong@g16.nasp
|
||||||
|
g17.nasp
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
# remotes
|
# remotes
|
||||||
nasp.remote() {
|
nasp.remote() {
|
||||||
remote=nasp.fit
|
remote=nasp.fit
|
||||||
|
@ -224,10 +224,16 @@ router() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
IFS=',' read -ra remotes <<< "$1"
|
IFS=',' read -ra remotes <<< "$1"
|
||||||
for remote in "${remotes[@]}"; do
|
for ((i=0; i<${#remotes[@]}; i++)); do
|
||||||
|
remote="${remotes[i]}"
|
||||||
if [[ -z "$remote" ]]; then
|
if [[ -z "$remote" ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
local batch_func="${remote}.batch"
|
||||||
|
if is_function "$batch_func"; then
|
||||||
|
"$batch_func"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
parse_remote "$remote"
|
parse_remote "$remote"
|
||||||
case $2 in
|
case $2 in
|
||||||
ssh|"" )
|
ssh|"" )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user