makedeb


bmx-ng-bin 0.138.3.53-0


The compiler and IDE for the BlitzMax language

Viewing /MaxIDE.

View raw.

Click here to go back to the Git tree for bmx-ng-bin.

#!/bin/sh

_name="bmx-ng"
config_dir=${XDG_CONFIG_HOME:-$HOME/.config}/$_name/opt

if [ ! -e $config_dir ]; then

  mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/$_name
  cp -as /usr/share/$_name/ $config_dir
  install -m755 /usr/libexec/$_name/MaxIDE  $config_dir/
  install -m755 /usr/libexec/$_name/bmk  $config_dir/bin/
  install -m644 /usr/share/doc/$_name/pkgver $config_dir/pkgver

  ln -s /usr/libexec/$_name/docmods $config_dir/bin/
  ln -s /usr/libexec/$_name/makedocs $config_dir/bin/
  ln -s /usr/libexec/$_name/bcc $config_dir/bin/

else

  if [ -n "$(cmp "$config_dir/pkgver"  "/usr/share/doc/$_name/pkgver" 2>&1 )" ]; then
    cp -nas /usr/share/$_name/ $config_dir
    install -C -m755 /usr/libexec/$_name/MaxIDE  $config_dir/
    install -C -m755 /usr/libexec/$_name/bmk  $config_dir/bin/

    install -m644 /usr/share/doc/$_name/pkgver $config_dir/pkgver
  fi

fi

exec $config_dir/MaxIDE "$@"