Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autostart script doesn't escape $HOME variable spaces #21

Closed
drewcovi opened this issue Jun 26, 2012 · 2 comments
Closed

autostart script doesn't escape $HOME variable spaces #21

drewcovi opened this issue Jun 26, 2012 · 2 comments

Comments

@drewcovi
Copy link

The bash script for the autostart appears to use the $HOME variable, but with a (very) few mac systems (at least mine) this variable has whitespace with "/Volumes/Macintosh HD". This is entirely due to the fact that I'm nuts and use an SSD for my OS and an HDD for my home directory (performance and storage ftw).

At your discretion this issue can be fixed by simply wrapping this variable in double quotes. I realize this is a super minor issue. thanks! :)

!/bin/sh

if [ -d "$HOME/Library/LaunchAgents/" ]; then
# Mac OS X
launch_agents_dir="$HOME/Library/LaunchAgents/"
name='com.chrome.devtools.autosave.launchd'
filename=$name.plist
cp -v dirname $0/$filename "$launch_agents_dir"
launchctl remove $name >/dev/null 2>/dev/null
launchctl load "$launch_agents_dir/$filename"
elif [ -d /etc/init ]; then
# Ubuntu
cp -v dirname $0/autosave.conf /etc/init/
start autosave
else
echo 'Unsupported platform'
exit 1
fi

@NV NV closed this as completed in 02beca6 Jun 26, 2012
@NV
Copy link
Owner

NV commented Jun 26, 2012

Fixed. Could you try to use it from the repo?

@drewcovi
Copy link
Author

you rock. thanks! all good here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants