Skip to content

Commit

Permalink
fix: Fix bug in dock.sh
Browse files Browse the repository at this point in the history
- fix bug introduced by lint fix
  • Loading branch information
martimlobao committed Nov 8, 2024
1 parent 049f4d6 commit 17ca90d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

if [[ ! -d ${DOTPATH} ]]; then
if [[ -z ${BRANCH} ]]; then
echo -e "\033[1;33mπŸ”— Cloning dotfiles...\033[0m"
echo -e "\033[1;33mπŸ“‘ Cloning dotfiles...\033[0m"
git clone https://github.com/martimlobao/dotfiles.git "${DOTPATH}"
echo -e "\033[1;32mβœ… Cloned Dotfiles to ${DOTPATH}\033[0m"
else
echo -e "\033[1;33mπŸ”— Cloning dotfiles on branch ${BRANCH}...\033[0m"
echo -e "\033[1;33mπŸ“‘ Cloning dotfiles on branch ${BRANCH}...\033[0m"
git clone https://github.com/martimlobao/dotfiles.git --branch "${BRANCH}" "${DOTPATH}"
echo -e "\033[1;32mβœ… Cloned Dotfiles to ${DOTPATH} on branch ${BRANCH}\033[0m"
fi
Expand Down
2 changes: 2 additions & 0 deletions dock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function add_folder_to_dock {
# 2 -> Grid
# 3 -> List
folder_path="${1}"
shift # remove folder_path from args
sortby="1"
displayas="0"
viewcontentas="0"
Expand All @@ -72,6 +73,7 @@ function add_folder_to_dock {
exit 1
;;
esac
shift # shift to next arg
shift
done

Expand Down
2 changes: 1 addition & 1 deletion linkme/.zprofile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if [[ ${CI} == "true" ]]; then
if [[ ${CI:-"false"} == "true" ]]; then
# Exit on error for CI
set -e
fi
Expand Down
29 changes: 17 additions & 12 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ source "${root}/bash_traceback.sh"
# OS and architecture detection #
###############################################################################
os="$(uname)"
# If os is neither Linux or Darwin, exit 1
if [[ ${os} != 'Darwin' ]] && [[ ${os} != 'Linux' ]]; then
echo -e "❌ \033[1;31mError: Unsupported OS: ${os}\033[0m"
exit 1
Expand Down Expand Up @@ -40,8 +39,11 @@ echo -e "\033[1;33mπŸš€ Running dotsync.sh...\033[0m"
sleep 1
./dotsync.sh "${1-}"

# Linux is not supported after this point
###############################################################################
# Linux exit #
###############################################################################
if [[ ${os} == "Linux" ]]; then
echo
echo -e "\033[1;33m ⛔️ Warning: Linux is not supported after this point.\033[0m"
exit 0
fi
Expand All @@ -53,20 +55,15 @@ fi
# echo -e "\033[1;33mπŸš€ Running macos.sh...\033[0m"
# sudo ./macos.sh

# CI is not supported after this point
if [[ ${GITHUB_ACTIONS} == "true" ]]; then
###############################################################################
# CI exit #
###############################################################################
if [[ ${CI-} == "true" ]]; then
echo
echo -e "\033[1;33m ⛔️ Warning: macOS is not supported in CI after this point.\033[0m"
exit 0
fi

###############################################################################
# Local settings and variables #
###############################################################################
echo
echo -e "\033[1;33mπŸš€ Running local.sh...\033[0m"
sleep 1
./local.sh "${1-}"

###############################################################################
# Install apps and software #
###############################################################################
Expand All @@ -79,5 +76,13 @@ echo -e "\033[1;33mπŸš€ Running dock.sh...\033[0m"
sleep 1
./dock.sh

###############################################################################
# Local settings and variables #
###############################################################################
echo
echo -e "\033[1;33mπŸš€ Running local.sh...\033[0m"
sleep 1
./local.sh "${1-}"

echo
echo -e "\033[1;32mπŸŽ‰ Setup complete!\033[0m"

0 comments on commit 17ca90d

Please sign in to comment.