summarylogtreecommitdiffstats
path: root/aimp
diff options
context:
space:
mode:
authorBad Cast2022-12-15 15:03:52 +0600
committerBad Cast2022-12-15 15:03:52 +0600
commitb9d9417750fb86e4d2f262c4848431debada473b (patch)
tree2031ac6f5da86a040c103fb2746543053003dff0 /aimp
parent3b6e67bd50cf41eb8e9f1ce334a4307ad368dc5e (diff)
downloadaur-b9d9417750fb86e4d2f262c4848431debada473b.tar.gz
Fixed ARG's
Diffstat (limited to 'aimp')
-rw-r--r--aimp16
1 files changed, 11 insertions, 5 deletions
diff --git a/aimp b/aimp
index 56acb60b976c..b662973036d7 100644
--- a/aimp
+++ b/aimp
@@ -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}