Skip to content

Commit dab2c86

Browse files
author
Murilo Marinho
committed
[template] Try adding b1z1 template to website.
1 parent 14fd1b3 commit dab2c86

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/scripts/pre_build.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ set -e
55
clone_and_rename_readme(){
66
# $1 must be the repository name
77
# $2 must be the branch
8+
# $3 must be the author or empty
89

910
FOLDER_NAME=$(basename "$1" .git)
1011

1112
git clone "$1" -b "$2" --single-branch --depth=1
1213
cd "$FOLDER_NAME"
13-
mv README.md "${FOLDER_NAME}"_README.md
14+
15+
FILE_NAME="${FOLDER_NAME}"_README.md
16+
mv README.md FILE_NAME
17+
# Add author info if needed
18+
if [[ $3 ]]
19+
sed -i $(printf "---\n author: ${3}\n ---") FILE_NAME
20+
fi
21+
1422
cd ..
1523
}
1624

@@ -23,6 +31,10 @@ clone_and_rename_readme https://github.com/SmartArmStack/docker-coppeliasim.git
2331
clone_and_rename_readme https://github.com/MarinhoLab/sas_ur_control_template.git main
2432
clone_and_rename_readme https://github.com/MarinhoLab/sas_kuka_control_template.git main
2533

34+
# Content from other authors
35+
# JJQO
36+
clone_and_rename_readme https://github.com/Adorno-Lab/sas_unitree_b1z1_control_template main "Juan Jose Quiroz Omana"
37+
2638
cd .. # Get out of submodules
2739
cd scripts # Go back to `scripts`
2840

0 commit comments

Comments
 (0)