makedeb


bmx-ng-bin 0.138.3.53-0


The compiler and IDE for the BlitzMax language

Viewing /bmk.

View raw.

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

#!/bin/sh

_name="bmx-ng"
if [ ! -e "$PWD/$_name" ]; then

  printf "\33[2K\r\033[1;33m%s\033[0m\n" "Creating folder: $PWD/$_name" >&2
  cp -as /usr/share/$_name .
  install -m755 /usr/libexec/$_name/bmk  ./$_name/bin/
  ln -s /usr/libexec/$_name/bcc ./$_name/bin/
  install -m644 /usr/share/doc/$_name/pkgver ./$_name/pkgver

  ln -s /usr/libexec/$_name/docmods ./$_name/bin/
  ln -s /usr/libexec/$_name/makedocs ./$_name/bin/

else

  if [ -n "$(cmp "./$_name/pkgver"  "/usr/share/doc/$_name/pkgver" 2>&1 )" ]; then

    printf "\33[2K\r\033[1;33m%s\033[0m\n" "Upgrading folder: $PWD/$_name" >&2
    cp -nas /usr/share/$_name/ .
    install -C -m755 /usr/libexec/$_name/bmk  ./$_name/bin/

    install -m644 /usr/share/doc/$_name/pkgver ./$_name/pkgver

  fi

fi

exec ./$_name/bin/bmk "$@"