Skip to content

Commit

Permalink
Changing cd to project folder to handle spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbirk committed Nov 10, 2011
1 parent 3bd81cc commit fb6d54d
Show file tree
Hide file tree
Showing 23 changed files with 28 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Commands/Apex Reference.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "&lt;script&gt;window.location.href='http://www.salesforce.com/us/developer/docs/apexcode/index.htm'&lt;/script&gt;"
Expand Down
2 changes: 1 addition & 1 deletion Commands/Build All.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<string>nop</string>
<key>command</key>
<string>echo "&lt;h1&gt;Building Project&lt;/h1&gt;"
cd $TM_PROJECT_DIRECTORY
cd "${TM_PROJECT_DIRECTORY}"
echo "&lt;div style='background-color:#ccc'&gt;&lt;pre&gt;;"
. build.properties
if[ ! -f "new.properties"]
Expand Down
2 changes: 1 addition & 1 deletion Commands/Build File.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fi
fi
cd $TM_PROJECT_DIRECTORY
cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ! -f "new.properties" ]
Expand Down
4 changes: 2 additions & 2 deletions Commands/Build Latest.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ! -f "new.properties" ]
then
Expand All @@ -29,7 +29,7 @@ cd ..
echo "&lt;h1&gt;Building Latest&lt;/h1&gt;"
echo "&lt;pre&gt;"
cd $TM_PROJECT_DIRECTORY
cd "${TM_PROJECT_DIRECTORY}"
cd classes
for file in $(find . -name "*.cls" -mtime -1)
Expand Down
2 changes: 1 addition & 1 deletion Commands/Build Sequential.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ! -f "new.properties" ]
then
Expand Down
2 changes: 1 addition & 1 deletion Commands/Custom Labels.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "&lt;script&gt;window.location.href='https://${pod}.salesforce.com/101'&lt;/script&gt;"</string>
Expand Down
2 changes: 1 addition & 1 deletion Commands/Debug Logs.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "&lt;script&gt;window.location.href='https://${pod}.salesforce.com/setup/ui/listApexTraces.apexp'&lt;/script&gt;"</string>
Expand Down
3 changes: 2 additions & 1 deletion Commands/Delete Except.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>for file in $(find . -name "*.cls*")
<string>cd "${TM_PROJECT_DIRECTORY}"
for file in $(find . -name "*.cls*")
do
if [[ $file != *$TM_SELECTED_TEXT* ]]
then
Expand Down
2 changes: 1 addition & 1 deletion Commands/Execute:Debug Apex.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "&lt;script&gt;window.location.href='https://${pod}.salesforce.com/_ui/common/apex/debug/ApexCSIPage'&lt;/script&gt;"</string>
Expand Down
2 changes: 1 addition & 1 deletion Commands/Get Latest.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<string>echo "&lt;h1&gt;Getting Latest From Server&lt;/h1&gt;"
echo "&lt;div style='border:1px solid #ccc; padding: 5px;'&gt;&lt;pre&gt;"
cd $TM_PROJECT_DIRECTORY
cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ! -f "new.properties" ]
then
Expand Down
5 changes: 3 additions & 2 deletions Commands/Get Object.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<string>nop</string>
<key>command</key>
<string>#get username and password from project
cd $TM_PROJECT_DIRECTORY
cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ${usekeychainaccess} == 'enabled' ]
Expand Down Expand Up @@ -42,6 +42,7 @@ fi
#make REST callout
echo "data = " &gt; data.json
data=$(curl -s https://${pod}.salesforce.com/services/data/v20.0/sobjects/${TM_SELECTED_TEXT}/describe -H "Authorization: OAuth ${session}" -H "X-PrettyPrint:1")
echo $data
echo $data &gt;&gt; data.json
#check to see if session expired
Expand All @@ -64,7 +65,7 @@ echo "&lt;script&gt;window.location = 'file://${dir}/objectinfo.html'&lt;/script
#cleanup
sleep 1
rm data.json
#rm data.json
</string>
<key>input</key>
Expand Down
2 changes: 1 addition & 1 deletion Commands/Go To Record.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "&lt;script&gt;document.title = '${TM_SELECTED_TEXT}'&lt;/script&gt;"
echo "&lt;script&gt;window.location.href='https://${pod}.salesforce.com/${TM_SELECTED_TEXT}'&lt;/script&gt;"</string>
Expand Down
2 changes: 1 addition & 1 deletion Commands/Go To Visualforce Page.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
pagename=${TM_SELECTED_TEXT:-$TM_FILENAME}
echo "&lt;script&gt;document.title = '${pagename%.*}'&lt;/script&gt;"
Expand Down
2 changes: 1 addition & 1 deletion Commands/Logout.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "&lt;script&gt;window.location.href='https://${pod}.salesforce.com/secur/logout.jsp'&lt;/script&gt;"
Expand Down
2 changes: 1 addition & 1 deletion Commands/New Custom Object.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "&lt;script&gt;window.location.href='https://${pod}.salesforce.com/01I/e?setupid=CustomObjects'&lt;/script&gt;"</string>
Expand Down
2 changes: 1 addition & 1 deletion Commands/New Debug Log.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "&lt;script&gt;window.location.href='https://${pod}.salesforce.com/p/setup/layout/AddApexDebugLogUser'&lt;/script&gt;"</string>
Expand Down
2 changes: 1 addition & 1 deletion Commands/Production Deploy.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>command</key>
<string>echo "&lt;h1&gt;Getting Latest From Server&lt;/h1&gt;"
echo "&lt;div style='border:1px solid #ccc; padding: 5px;'&gt;&lt;pre&gt;"
cd $TM_PROJECT_DIRECTORY
cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if[ ! -f "new.properties"]
Expand Down
2 changes: 1 addition & 1 deletion Commands/Production Test.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>command</key>
<string>echo "&lt;h1&gt;Getting Latest From Server&lt;/h1&gt;"
echo "&lt;div style='border:1px solid #ccc; padding: 5px;'&gt;&lt;pre&gt;"
cd $TM_PROJECT_DIRECTORY
cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if[ ! -f "new.properties"]
Expand Down
2 changes: 1 addition & 1 deletion Commands/Run Current Tests.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
echo "&lt;h1&gt;Running Tests for ${TM_FILENAME%.*}&lt;/h1&gt;"
cp build.xml backup-build.xml
Expand Down
3 changes: 2 additions & 1 deletion Commands/Run SOQL.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<string>nop</string>
<key>command</key>
<string>#get username and password from project
cd $TM_PROJECT_DIRECTORY
cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ${usekeychainaccess} == 'enabled' ]
then
Expand Down Expand Up @@ -42,6 +42,7 @@ query=$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "${TM_SELECTED_TEXT}
echo $query &gt; query
echo "data = " &gt; data.json
data=$(curl -s https://${pod}.salesforce.com/services/data/v22.0/query/?q=${query} -H "Authorization: OAuth ${session}" -H "X-PrettyPrint:1")
echo $data
echo $data &gt;&gt; data.json
#check to see if session expired
Expand Down
2 changes: 1 addition & 1 deletion Commands/Run Tests.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>command</key>
<string>echo "&lt;h1&gt;Running All Tests&lt;/h1&gt;"
echo "&lt;div style='border:1px solid #ccc; padding: 5px; font-size: 9px'&gt;&lt;pre&gt;"
cd $TM_PROJECT_DIRECTORY
cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if[ ! -f "new.properties"]
Expand Down
2 changes: 1 addition & 1 deletion Commands/Start New Project.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<string>nop</string>
<key>command</key>
<string>echo "&lt;h1&gt;Creating new project&lt;/h1&gt;"
cd $TM_PROJECT_DIRECTORY
cd "${TM_PROJECT_DIRECTORY}"
mkdir classes
mkdir components
Expand Down
2 changes: 1 addition & 1 deletion Commands/Visualforce Reference.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>cd $TM_PROJECT_DIRECTORY
<string>cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "&lt;script&gt;window.location.href='https://${pod}.salesforce.com/apexpages/apexcomponents.apexp'&lt;/script&gt;"
Expand Down

0 comments on commit fb6d54d

Please sign in to comment.