diff options
author | Bad Cast | 2022-12-15 15:03:52 +0600 |
---|---|---|
committer | Bad Cast | 2022-12-15 15:03:52 +0600 |
commit | b9d9417750fb86e4d2f262c4848431debada473b (patch) | |
tree | 2031ac6f5da86a040c103fb2746543053003dff0 /aimp | |
parent | 3b6e67bd50cf41eb8e9f1ce334a4307ad368dc5e (diff) | |
download | aur-b9d9417750fb86e4d2f262c4848431debada473b.tar.gz |
Fixed ARG's
Diffstat (limited to 'aimp')
-rw-r--r-- | aimp | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -7,11 +7,17 @@ #FIX: arguments start with "/" Don't exist to AIMP main command's #WHILE: Open Dir, Open Files, set cmd (Stop, Pause, Play, Debug, Next, Prev) worked. And next todo, add-to-playlist, set to playlist .etc. adding. +#default args _args="$1" -if [ -f $_args ] || [ -d $_args ]; then - #arguments is file(s) - _args=$(winepath --windows "$@") -fi -echo $_args +for a in '/DEBUG' '/PLAY' '/PAUSE' '/NEXT' '/PREV' '/STOP' +do + if [[ "$_args" != "$a" ]] && [[ -e $_args ]]; then + #arguments is file(s) + _args=$(winepath --windows "$@") + break; + fi +done + +echo "$(basename $0): $_args" /usr/bin/wine start /unix '/opt/aimp/AIMP/AIMP.exe' ${_args} |