Skip to content

Instantly share code, notes, and snippets.

@grikomsn
Created June 11, 2020 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save grikomsn/8522bc324522e4242c40948597160661 to your computer and use it in GitHub Desktop.
Save grikomsn/8522bc324522e4242c40948597160661 to your computer and use it in GitHub Desktop.
patch_electron() {
SED_PATTERN='s/ /\\ /g'
APP_PATCHED=$(echo $1 | sed -e "$SED_PATTERN")
APP_ORIG="$APP_PATCHED\ 2"
APP_PWD=$(pwd | sed -e "$SED_PATTERN")
if [ $# -eq 0 ]
then
printf "name pls\n"
else
cp -p "$1" "$1 2"
printf "#!/bin/bash\n$APP_ORIG --args --disable-gpu \$@\n" > "$1"
chmod +x "$1"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment