mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 10:46:40 +00:00
Ensure created Chrome SSB apps are a bit more portable
As in, don't hard-code the user data directory path into the executable at creation time, instead use the $HOME environment variable.
This commit is contained in:
@@ -27,12 +27,12 @@ exec_dir="${app_path}/Contents/MacOS"
|
||||
exec_file="${exec_dir}/${name//[[:space:]]}"
|
||||
plist_file="${app_path}/Contents/Info.plist"
|
||||
|
||||
app_support="${HOME}/Library/Application Support"
|
||||
app_support="\${HOME}/Library/Application Support"
|
||||
profile_dir="${app_support}/me.jimeh.chrome-ssb/Apps/${name}"
|
||||
bundle_identifier="me.jimeh.chrome-ssb.${name}"
|
||||
|
||||
# Create the directories.
|
||||
mkdir -p "$resource_dir" "$exec_dir" "$profile_dir"
|
||||
mkdir -p "$resource_dir" "$exec_dir"
|
||||
|
||||
# convert the icon and copy into Resources
|
||||
if [ -f "$icon" ] ; then
|
||||
@@ -49,6 +49,7 @@ fi
|
||||
# Create the executable.
|
||||
cat > "$exec_file" <<EOF
|
||||
#!/bin/sh
|
||||
mkdir -p "${profile_dir}"
|
||||
exec "${chrome_path}" \\
|
||||
--app="${url}" \\
|
||||
--user-data-dir="${profile_dir}" \\
|
||||
|
||||
Reference in New Issue
Block a user