Skip to content

Make this project POSIX Compliant. #2

Description

@calebe94

Expected Behavior

Make this project POSIX Compliant.

Current Behavior

Log from shellcheck:

In tpomodoro line 57:
SLEEP=sleep
^---^ SC2034: SLEEP appears unused. Verify use (or export if used externally).
^---^ SC2209: Use var=$(command) to assign output (or quote to assign string).


In tpomodoro line 101:
  if [[ "$(uname -s)" -eq "Linux" ]]; then
                          ^-----^ SC2154: Linux is referenced but not assigned.


In tpomodoro line 121:
  for index in $(seq 1 $TIME_TO_SLEEP); do
                       ^------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
  for index in $(seq 1 "$TIME_TO_SLEEP"); do


In tpomodoro line 122:
    ( $DISPLAY_TIME && convertsecs $index )
                                   ^----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    ( $DISPLAY_TIME && convertsecs "$index" )


In tpomodoro line 141:
  AUX_LOG_FILE=$(ls $LOG_FILE)
                    ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
  AUX_LOG_FILE=$(ls "$LOG_FILE")


In tpomodoro line 143:
  if [ $AUX_LOG_FILE ]; then
       ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$AUX_LOG_FILE" ]; then


In tpomodoro line 146:
    ($VERBOSE && echo "Creating $LOG_FILE file..." && echo "PID;Title;Message;Timer Type;Time;Date Time" >> $LOG_FILE)
                                                                                                            ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    ($VERBOSE && echo "Creating $LOG_FILE file..." && echo "PID;Title;Message;Timer Type;Time;Date Time" >> "$LOG_FILE")


In tpomodoro line 149:
  echo "$$;$TITLE;$START_MESSAGE;$TIMER_TYPE;$TIME;$(date)" >> $LOG_FILE
                                                               ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
  echo "$$;$TITLE;$START_MESSAGE;$TIMER_TYPE;$TIME;$(date)" >> "$LOG_FILE"


In tpomodoro line 153:
  echo "$$;$TITLE;$STOP_MESSAGE;$TIMER_TYPE;$TIME;$(date)" >> $LOG_FILE
                                                              ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
  echo "$$;$TITLE;$STOP_MESSAGE;$TIMER_TYPE;$TIME;$(date)" >> "$LOG_FILE"

For more information:
  https://www.shellcheck.net/wiki/SC2034 -- SLEEP appears unused. Verify use ...
  https://www.shellcheck.net/wiki/SC2154 -- Linux is referenced but not assig...
  https://www.shellcheck.net/wiki/SC2209 -- Use var=$(command) to assign outp...

Possible Solution

Steps to Reproduce

Context (Environment)

Detailed Description

Possible Implementation

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions