Skip to content

Commit

Permalink
feat(goland): Adding install link
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Nov 27, 2024
1 parent e5de348 commit 2fcff9f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@ indent_style = tab
[sublime/text/settings/*]
indent_style = tab

[*.sublime-syntax]
indent_style = space

[gitconfig*]
indent_style = tab
2 changes: 1 addition & 1 deletion goland/config/keymaps/Sublime Text _macOS_ copy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
<keyboard-shortcut first-keystroke="ctrl a" />
<keyboard-shortcut first-keystroke="home" />
</action>
</keymap>
</keymap>
2 changes: 1 addition & 1 deletion goland/config/options/watcherDefaultTasks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@
</TaskOptions>
</global-watchers>
</component>
</application>
</application>
22 changes: 21 additions & 1 deletion goland/init.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,27 @@ main() {
local SCRIPT_DIR
SCRIPT_DIR="$(script_dir)"

echo todo
local GOLAND_VERSION="GoLand2024.3"

local CONFIG_DIR="${SCRIPT_DIR}/config"
local TARGET_DIR="${HOME}/Library/Application Support/JetBrains/${GOLAND_VERSION}"

while IFS= read -r -d '' file; do
local TARGET_FILE="${file/#${CONFIG_DIR}/${TARGET_DIR}}"

local TARGET_FILE_DIR
TARGET_FILE_DIR="$(dirname "${TARGET_FILE}")"

if ! [[ -d "${TARGET_FILE_DIR}" ]]; then
mkdir -p "${TARGET_FILE_DIR}"
fi

if [[ -e "${TARGET_FILE}" ]]; then
rm -f "${TARGET_FILE}"
fi

ln -s "${file}" "${TARGET_FILE}"
done < <(find "${CONFIG_DIR}" -type f -print0)
}

main "${@}"

0 comments on commit 2fcff9f

Please sign in to comment.