Last active
January 2, 2016 19:29
-
-
Save luizdepra/8350677 to your computer and use it in GitHub Desktop.
Install script for Windows and Linux used for syncing packages and configuration from Sublime Text 3 via Dropbox.
This file contains hidden or 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
@echo off | |
:: Change those two varaibles | |
set DROPBOX_PATH=C:\Users\<YourUserHere>\Dropbox\AppData\SublimeText3 | |
set SUBLIME_PATH=C:\Users\<YourUserHere>\AppData\Roaming\Sublime Text 3 | |
:: Remove default folders if exists | |
if exist "%SUBLIME_PATH%\Installed Packages" (goto remove_ipkg) else (goto check_pkg) | |
:remove_ipkg | |
echo Removing "%SUBLIME_PATH%\Installed Packages" | |
rmdir /s /q "%SUBLIME_PATH%\Installed Packages" | |
:check_pkg | |
if exist "%SUBLIME_PATH%\Packages" (goto remove_pkg) else (goto install) | |
:remove_pkg | |
echo Removing "%SUBLIME_PATH%\Packages" | |
rmdir /s /q "%SUBLIME_PATH%\Packages" | |
:: Install links | |
:install | |
mklink /D "%SUBLIME_PATH%\Installed Packages" "%DROPBOX_PATH%\Installed Packages" | |
mklink /D "%SUBLIME_PATH%\Packages" "%DROPBOX_PATH%\Packages" | |
echo Done! |
This file contains hidden or 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/sh | |
# Change those two varaibles | |
DROPBOX_PATH=/home/<YourUserHere>/Dropbox/AppData/SublimeText3 | |
SUBLIME_PATH=/home/<YourUserHere>/.config/sublime-text-3 | |
# Remove default folders if exists | |
if [ -d "$SUBLIME_PATH/Installed Packages" ]; then | |
echo "Removing $SUBLIME_PATH/Installed Packages" | |
rm -rf "$SUBLIME_PATH/Installed Packages" | |
fi | |
if [ -d "$SUBLIME_PATH/Packages" ]; then | |
echo "Removing $SUBLIME_PATH/Packages" | |
rm -rf "$SUBLIME_PATH/Packages" | |
fi | |
# Install links | |
ln -s "$DROPBOX_PATH/Installed Packages" "$SUBLIME_PATH/Installed Packages" | |
ln -s "$DROPBOX_PATH/Packages" "$SUBLIME_PATH/Packages" | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment