summarylogtreecommitdiffstats
path: root/aimp
blob: b662973036d7a36a7f79a1f0ba50fe83a1838d9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/sh
#Convert Linux paths to Windows paths.
#Example:
#GNU LINUX | WINDOWS OS
#    $HOME = %USERPROFILE%\ (etc).

#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"

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}