make par command idempotent if possible
This commit is contained in:
parent
e08e1da514
commit
7650685b08
|
@ -13,8 +13,12 @@ playlistInfo="$playlistTitle"
|
|||
output="$(mkdir "$playlistTitle")"
|
||||
status=$?
|
||||
if [ $status -ne 0 ]; then
|
||||
playlistTitle=`echo "$playlistJSON" | jq -r '.id'`
|
||||
mkdir "$playlistTitle"
|
||||
output="$(cd "$playlistTitle")"
|
||||
status=$?
|
||||
if [ $status -ne 0 ]; then
|
||||
playlistTitle=`echo "$playlistJSON" | jq -r '.id'`
|
||||
mkdir "$playlistTitle"
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "$playlistTitle"
|
||||
|
|
Loading…
Reference in New Issue
Block a user