Created
September 5, 2024 14:22
-
-
Save toml01/b413bd736562a5dd6f3d2754ff24facc to your computer and use it in GitHub Desktop.
Automate cursor symlink fix for WSL (building on top of @swayducky 's great gist!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# HOW TO INSTALL: | |
# 1) Save this script as cursor_fix.sh | |
# 2) chmod +x cursor_fix.sh | |
# 3) ./cursor_fix.sh | |
wget -O cursor_fix_template https://gist.githubusercontent.com/swayducky/8ba8f2db156c7f445d562cdc12c0ddb4/raw/6c3a3c0be667ed487de5c6fd94fad7a7d8e5d61f/cursor | |
perl -i -pe 's/<YOUR_USERNAME>/`cmd.exe \/c echo %USERNAME% 2>\/dev\/null | tr -d "\r\n"`/ge' cursor_fix_template | |
perl -i -pe 's/ln -s "\$MY_CLI_DIR_YO\/cursor" "\$MY_CLI_DIR_YO\/code"/ln -sf "\$MY_CLI_DIR_YO\/cursor" "\$MY_CLI_DIR_YO\/code"/g' cursor_fix_template | |
mv cursor_fix_template $(which cursor) | |
chmod +x $(which cursor) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you also check this one and see if it is a proper fix? https://gist.github.com/BradKML/b84675c356007c8029ce927c484f4cc6