Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
pushd . > /dev/null | ||
cd "$(dirname "$0")" | ||
cd .. | ||
|
||
echo "Committing last changes..." | ||
echo "Note you maybe have to manually add new files you changed ('git add mynewfile.ext')" | ||
|
||
#ask for a message | ||
read -p "Write a commit message to identify this commit and its changes and press ENTER: " | ||
git commit -a -m "$REPLY" | ||
|
||
read -p "Succesfully commited! Do you want to push? [y/n] " -n 1 | ||
echo "" | ||
if [[ $REPLY =~ ^[Yy]$ ]]; then | ||
git push | ||
echo "Pushed!" | ||
fi | ||
|
||
popd > /dev/null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
TOTALSPACES_RESOURCES='/Applications/TotalSpaces.app/Contents/Resources' | ||
TOTALSPACES_RESOURCES_BACKUP='/Applications/TotalSpaces.app/Contents/ResourcesOrig' | ||
|
||
# need absolute path of the repo's root | ||
pushd . > /dev/null | ||
cd "$(dirname "$0")" | ||
cd .. | ||
ROOT=$PWD | ||
|
||
if [ ! -d "$TOTALSPACES_RESOURCES" ]; then # is it a folder? | ||
echo "Please install TotalSpaces. Folder '$TOTALSPACES_RESOURCES' not found". | ||
popd > /dev/null | ||
exit | ||
fi | ||
|
||
if [ -L "$TOTALSPACES_RESOURCES" ]; then # is is a symlink? | ||
echo "TotalSpaces is already in dev mode. Folder '$TOTALSPACES_RESOURCES' is a symlink! Exiting.". | ||
popd > /dev/null | ||
exit | ||
fi | ||
|
||
# ok, we should be safe to do the replacement | ||
sudo mv "$TOTALSPACES_RESOURCES" "$TOTALSPACES_RESOURCES_BACKUP" | ||
sudo ln -s "$ROOT/app" "$TOTALSPACES_RESOURCES" | ||
sudo cp "$TOTALSPACES_RESOURCES_BACKUP/"*.nib "$TOTALSPACES_RESOURCES" | ||
sudo cp "$TOTALSPACES_RESOURCES_BACKUP/"*.png "$TOTALSPACES_RESOURCES" | ||
sudo cp "$TOTALSPACES_RESOURCES_BACKUP/"*.plist "$TOTALSPACES_RESOURCES" | ||
sudo cp "$TOTALSPACES_RESOURCES_BACKUP/"*.html "$TOTALSPACES_RESOURCES" | ||
sudo cp "$TOTALSPACES_RESOURCES_BACKUP/"*.icns "$TOTALSPACES_RESOURCES" | ||
sudo cp "$TOTALSPACES_RESOURCES_BACKUP/"*.pem "$TOTALSPACES_RESOURCES" | ||
sudo cp "$TOTALSPACES_RESOURCES_BACKUP/"*.applescript "$TOTALSPACES_RESOURCES" | ||
sudo cp "$TOTALSPACES_RESOURCES_BACKUP/"*.scpt "$TOTALSPACES_RESOURCES" | ||
sudo cp -r "$TOTALSPACES_RESOURCES_BACKUP/"*.app "$TOTALSPACES_RESOURCES" | ||
|
||
popd > /dev/null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
pushd . > /dev/null | ||
cd "$(dirname "$0")" | ||
cd .. | ||
|
||
# quit TotalSpaces | ||
osascript -e "tell application \"TotalSpaces\" to quit" | ||
|
||
killall -SIGINT TotalSpacesCrashWatcher | ||
|
||
# start TotalSpaces agan | ||
open /Applications/TotalSpaces.app | ||
|
||
popd > /dev/null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
pushd . > /dev/null | ||
cd "$(dirname "$0")" | ||
cd .. | ||
|
||
echo "This may end in conflict, see git docs." | ||
|
||
#point to server | ||
read -p "Is this the first time you sync? [y/n] " -n 1 | ||
echo "" | ||
if [[ $REPLY =~ ^[Yy]$ ]]; then | ||
git remote add ba git://github.com/binaryage/totalspaces-i18n.git | ||
echo "Pointed!" | ||
fi | ||
|
||
#merge repos | ||
git fetch ba && git merge ba/master | ||
echo "Merged!" | ||
|
||
#push to GitHub | ||
read -p "Do you want to push to GitHub? This will update the online repo with any commit you made since last push. Until you do this, changes won't be in your GitHub fork. [y/n] " -n 1 | ||
echo "" | ||
if [[ $REPLY =~ ^[Yy]$ ]]; then | ||
git push | ||
echo "Pushed!" | ||
fi | ||
|
||
popd > /dev/null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
TOTALSPACES_RESOURCES='/Applications/TotalSpaces.app/Contents/Resources' | ||
TOTALSPACES_RESOURCES_BACKUP='/Applications/TotalSpaces.app/Contents/ResourcesOrig' | ||
|
||
if [ -d "$TOTALSPACES_RESOURCES" ]; then # is it a folder? | ||
if [ -L "$TOTALSPACES_RESOURCES" ]; then # is it a symlink? | ||
sudo rm "$TOTALSPACES_RESOURCES" | ||
sudo mv "$TOTALSPACES_RESOURCES_BACKUP" "$TOTALSPACES_RESOURCES" | ||
exit | ||
fi | ||
fi | ||
|
||
echo "Failed: TotalSpaces is not installed or not in dev mode" |