Fix assignments in bash scripts

This commit is contained in:
John 2022-04-28 17:38:47 -05:00
parent e8afacef18
commit e749399793
2 changed files with 8 additions and 8 deletions

View File

@ -4,7 +4,7 @@
#* Ensures git is installed, clones the repo, and then runs #* Ensures git is installed, clones the repo, and then runs
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
ELEVATE='';if (( $UID != 0 )); then ELEVATE='sudo';fi ELEVATE='';if (( $UID !=0 )); then ELEVATE='sudo';fi
help () { help () {
echo "Usage: $0 [-g path/to/git/directory]" echo "Usage: $0 [-g path/to/git/directory]"
@ -12,7 +12,7 @@ help () {
} }
GITDIR = "~/git" GITDIR="~/git"
# Get option flags: # Get option flags:
dry=false dry=false
@ -32,8 +32,8 @@ function dryrun {
$@ $@
} }
SETUPDIR= "Mind_Reader/setup-development" SETUPDIR="Mind_Reader/setup-development"
REPOURI = "https://github.com/We-Dont-Byte/Mind_Reader.git" REPOURI="https://github.com/We-Dont-Byte/Mind_Reader.git"
# Install git # Install git
if which git; then if which git; then

View File

@ -7,7 +7,7 @@
# If run with bash -vx, print useful information instead of just a + sign # If run with bash -vx, print useful information instead of just a + sign
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
# If run as root, it could be because sudo isn't installed (some people disagree with sudo, especially on Arch) # If run as root, it could be because sudo isn't installed (some people disagree with sudo, especially on Arch)
ELEVATE='';if (( $UID != 0 )); then;ELEVATE='sudo';fi ELEVATE='';if (( $UID !=0 )); then;ELEVATE='sudo';fi
# Get option flags: # Get option flags:
dry=false dry=false
@ -65,14 +65,14 @@ cd ../..
# Check the VSCode version # Check the VSCode version
nodeversion="node" nodeversion="node"
electronversion = "" electronversion=""
#* Note: #* Note:
#* When adding support for new VSCode versions, update this case #* When adding support for new VSCode versions, update this case
#* By the time you're working on this project, things are likely going to differ! #* By the time you're working on this project, things are likely going to differ!
case (code --version) in case (code --version) in
#* Each version of VSCode has a corresponding Electron version and Node version #* Each version of VSCode has a corresponding Electron version and Node version
#* These are used when #* These are used when
1.66.*) electronversion = "17.2.0"; nodeversion = "16.13.0";; 1.66.*) electronversion="17.2.0"; nodeversion="16.13.0";;
*) ;; *) ;;
esac esac
@ -87,7 +87,7 @@ dryrun npm install electron-rebuild yo generator-code
dryrun npm install dryrun npm install
# Use electron-rebuild to rebuild electron # Use electron-rebuild to rebuild electron
if (( electronversion != "" )); then if (( electronversion !="" )); then
dryrun electron-rebuild --version $electronversion dryrun electron-rebuild --version $electronversion
else else
printf "%s/n%s/n%s/n%s/n" \ printf "%s/n%s/n%s/n%s/n" \