Skip to content

Instantly share code, notes, and snippets.

@naodesu
Created April 22, 2016 10:53
Show Gist options
  • Save naodesu/ffd74858cc852887d53fc6426ec12b49 to your computer and use it in GitHub Desktop.
Save naodesu/ffd74858cc852887d53fc6426ec12b49 to your computer and use it in GitHub Desktop.
Распаковывает инсталлятор 1С вида setup1c.exe и запускает его на выполнение
#!/bin/bash
set -u -e
cleanup() {
if [ -v tmp ]; then
echo rm -rf "$tmp"
fi
}
trap cleanup 0
if [ $# -lt 1 ]; then
echo Usage: $0 path_to_setup.exe
exit 1
fi
tmp=`mktemp -d`
unrar x $1 $tmp
cd $tmp
if [ -f setup ]; then
chmod a+x setup
./setup
else
wine setup.exe
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment