Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix bug in dock.sh #53

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
martimlobao marked this conversation as resolved.
Show resolved Hide resolved
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"