Bhupesh-V / dotman

dotman is a simple, elegant & easy to use dotfiles manager 🖖🏽
https://bhupesh-v.github.io/dotman
MIT License
106 stars 18 forks source link

logo causes errors #2

Closed smenzer closed 4 years ago

smenzer commented 4 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Run dotman.sh (see below)

$ zsh --version
zsh 5.7.1 (x86_64-apple-darwin19.0)

$ dotman/dotman.sh
dotman/dotman.sh: line 15: unexpected EOF while looking for matching ``'
dotman/dotman.sh: line 272: syntax error: unexpected end of file

$ sh

$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.

$ dotman/dotman.sh
dotman/dotman.sh: line 15: unexpected EOF while looking for matching ``'
dotman/dotman.sh: line 272: syntax error: unexpected end of file

Expected behavior The menu is shown, no errors appear

Desktop (please complete the following information):

Bhupesh-V commented 4 years ago

Can you please verify if the following change works?

DOTMAN_LOGO=$(cat <<- 'LOGO'

      _       _                         
     | |     | |                        
   __| | ___ | |_ _ __ ___   __ _ _ __  
  / _` |/ _ \| __| '_ ` _ \ / _` | '_ \ 
 | (_| | (_) | |_| | | | | | (_| | | | |
  \__,_|\___/ \__|_| |_| |_|\__,_|_| |_|

LOGO
)
smenzer commented 4 years ago

@Bhupesh-V no that's still causing errors:

$ head -n25 dotman.sh
#!/usr/bin/env bash

# (.dot)file (man)ager

IFS=$'\n'

set +x

VERSION="v0.1.0"
DOTMAN_LOGO=$(cat <<- 'LOGO'

      _       _
     | |     | |
   __| | ___ | |_ _ __ ___   __ _ _ __
  / _` |/ _ \| __| '_ ` _ \ / _` | '_ \
 | (_| | (_) | |_| | | | | | (_| | | | |
  \__,_|\___/ \__|_| |_| |_|\__,_|_| |_|

LOGO
)

# check if tput exists
if ! command -v tput &> /dev/null
then

$ ./dotman.sh
./dotman.sh: line 15: unexpected EOF while looking for matching ``'
./dotman.sh: line 272: syntax error: unexpected end of file
Bhupesh-V commented 4 years ago

Just realized, the error is occurring due to imbalanced ' & `. Will probably change the logo in next release

How's this for a change? 😅

DOTMAN_LOGO=$(cat << "LOGO"

  ┌┬┐┌──┐┌┬┐┌┬┐┌─┐┌┐┌
   │││🖖│ │ │││├─┤│││
  ─┴┘└──┘ ┴ ┴ ┴┴ ┴┘└┘

LOGO
)