rossabaker / abolish-ice-graphiti

Script to make your GitHub contribution graph read "abolish ice"
Creative Commons Zero v1.0 Universal
16 stars 6 forks source link

Shorten by use of mkdir -p and pushd/popd #5

Closed BenBE closed 4 years ago

BenBE commented 4 years ago

The script may be shortened by using mkdir -p "$Y/$M/$D" instead of that cascade of nested if statements. Also traversing into that directory can be simplified when using pushd "$Y/$M/$D"/popd

BenBE commented 4 years ago

You don't even need to eheck [ ! -d "$Y/$M/$D" ] as mkdir -p is a no-op if the target already exists.

rossabaker commented 4 years ago

Ah, true. Also eliminated entirely by #6.