Skip to content

Commit 0f05e3f

Browse files
committed
Fix bug in install_tool branching
1 parent d10fdcb commit 0f05e3f

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

Scripts/unit5_lab.sh

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ none='\033[0m'
55
scripts_repo="https://raw.githubusercontent.com/codepath/cyb102-vm-setup/${1:-"main"}/Files/"
66

77
echo "[UNIT 5 LAB] Starting script..."
8-
echo -e "Repo: ${scripts_repo}"
98

109
if sudo /opt/splunk/bin/splunk status | grep 'is running'; then
1110
echo -e "${green}[UNIT 5 LAB]${none} Splunk is already installed."

Scripts/unit5_project.sh

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ none='\033[0m'
55
scripts_repo="https://raw.githubusercontent.com/codepath/cyb102-vm-setup/${1:-"main"}/Files/"
66

77
echo "[UNIT 5 PROJECT] Starting script..."
8-
echo -e "Repo: ${scripts_repo}"
98

109
# Ensure the tmp_splunk directory exists
1110
if [ ! -d "$HOME/tmp_splunk" ]; then

install_tool.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ scripts_repo="https://raw.githubusercontent.com/codepath/cyb102-vm-setup/${branc
1212
echo -e "Welcome to ${green}CodePath Cybersecurity${none}!"
1313
echo -e "This tool will help you set up your environment for the ${course} course."
1414

15-
if ! branch="main"; then
16-
echo -e "${yellow}WARNING: You are using the a non-default branch {$branch}.${none}"
15+
if [ "$branch" != "main" ]; then
16+
echo -e "${yellow}WARNING: You are using the a non-default branch ${branch}.${none}"
1717
echo -e "${yellow}This is intended for development purposes only.${none}"
1818
fi
1919

0 commit comments

Comments
 (0)