-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_tutorial.sh
More file actions
executable file
·45 lines (37 loc) · 898 Bytes
/
start_tutorial.sh
File metadata and controls
executable file
·45 lines (37 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
check_os() {
os_type=$(uname)
if [ "$os_type" == "Darwin" ]; then
echo "The host operating system is macOS."
elif [ "$os_type" == "Linux" ]; then
echo "The host operating system is Linux."
else
echo "The host operating system is not suppported."
exit 1
fi
}
check_git() {
if command -v git &> /dev/null; then
echo "Git is installed."
else
echo "Git is not installed."
exit 1
fi
}
clean_readme() {
if [ -f "README.md" ]; then
first_line=$(head -n 1 README.md)
echo "$first_line" > README.md
echo "README.md has been cleaned."
else
echo "README.md does not exist in the current directory."
fi
}
check_os
check_git
clean_readme
echo "Removing workflows"
rm ./.github/workflows/*
echo "Removing tests"
rm ./tests/*
echo "Ready to start the tutorial"