Created
June 11, 2020 20:44
-
-
Save grikomsn/8522bc324522e4242c40948597160661 to your computer and use it in GitHub Desktop.
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
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