summarylogtreecommitdiffstats
path: root/microsip
diff options
context:
space:
mode:
authorOleksandr Natalenko2017-12-24 16:55:58 +0100
committerOleksandr Natalenko2017-12-24 16:55:58 +0100
commit0b6c4ab9fc89440e929609ce2bfa35e0d19d264f (patch)
tree0e27d1a3fbd7031031d9a60750d937b5ec939cf7 /microsip
parentf4a6d6513322c1ed04e47224307956d17f9f80c1 (diff)
downloadaur-0b6c4ab9fc89440e929609ce2bfa35e0d19d264f.tar.gz
simplify wrapper
Diffstat (limited to 'microsip')
-rwxr-xr-xmicrosip34
1 files changed, 19 insertions, 15 deletions
diff --git a/microsip b/microsip
index c10930b920f..815feb239ff 100755
--- a/microsip
+++ b/microsip
@@ -2,24 +2,28 @@
__APPNAME=$(basename $0)
__WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local}/wine/${__APPNAME}"
-__APPDIR="${__WINEPREFIX}/dosdevices/c:/Program Files (x86)/${__APPNAME}"
+__APPDIR="${__WINEPREFIX}/dosdevices/c:/${__APPNAME}"
+
+__symlink() {
+ ln -sf "$1" "${__APPDIR}/${1##*/}"
+}
mkdir -p "${__APPDIR}"
-ln -sf "/usr/share/licenses/${__APPNAME}/License.txt" "${__APPDIR}/License.txt"
-ln -sf "/usr/share/doc/${__APPNAME}/MicroSIP Website.url" "${__APPDIR}/MicroSIP Website.url"
-ln -sf "/usr/share/${__APPNAME}/hangup.wav" "${__APPDIR}/hangup.wav"
-ln -sf "/usr/share/${__APPNAME}/messagein.wav" "${__APPDIR}/messagein.wav"
-ln -sf "/usr/share/${__APPNAME}/messageout.wav" "${__APPDIR}/messageout.wav"
-ln -sf "/usr/share/${__APPNAME}/ringin.wav" "${__APPDIR}/ringin.wav"
-ln -sf "/usr/share/${__APPNAME}/ringin2.wav" "${__APPDIR}/ringin2.wav"
-ln -sf "/usr/share/${__APPNAME}/ringout.wav" "${__APPDIR}/ringout.wav"
-ln -sf "/usr/lib/${__APPNAME}/SDL.dll" "${__APPDIR}/SDL.dll"
-ln -sf "/usr/lib/${__APPNAME}/avcodec-57.dll" "${__APPDIR}/avcodec-57.dll"
-ln -sf "/usr/lib/${__APPNAME}/avformat-57.dll" "${__APPDIR}/avformat-57.dll"
-ln -sf "/usr/lib/${__APPNAME}/avutil-55.dll" "${__APPDIR}/avutil-55.dll"
-ln -sf "/usr/lib/${__APPNAME}/microsip.exe" "${__APPDIR}/microsip.exe"
-ln -sf "/usr/lib/${__APPNAME}/swscale-4.dll" "${__APPDIR}/swscale-4.dll"
+__symlink "/usr/share/licenses/${__APPNAME}/License.txt"
+__symlink "/usr/share/doc/${__APPNAME}/MicroSIP Website.url"
+__symlink "/usr/share/${__APPNAME}/hangup.wav"
+__symlink "/usr/share/${__APPNAME}/messagein.wav"
+__symlink "/usr/share/${__APPNAME}/messageout.wav"
+__symlink "/usr/share/${__APPNAME}/ringin.wav"
+__symlink "/usr/share/${__APPNAME}/ringin2.wav"
+__symlink "/usr/share/${__APPNAME}/ringout.wav"
+__symlink "/usr/lib/${__APPNAME}/SDL.dll"
+__symlink "/usr/lib/${__APPNAME}/avcodec-57.dll"
+__symlink "/usr/lib/${__APPNAME}/avformat-57.dll"
+__symlink "/usr/lib/${__APPNAME}/avutil-55.dll"
+__symlink "/usr/lib/${__APPNAME}/microsip.exe"
+__symlink "/usr/lib/${__APPNAME}/swscale-4.dll"
WINEPREFIX="${__WINEPREFIX}" wine "${__APPDIR}/microsip.exe"