Skip to content

Commit

Permalink
Add LinuxMint to Debian check and new install flags --force-debian an…
Browse files Browse the repository at this point in the history
…d --force-redhat. Fixes #6
  • Loading branch information
Andrewpk committed Jul 21, 2015
1 parent 34ccac4 commit 8425497
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
9 changes: 8 additions & 1 deletion README.md
Expand Up @@ -46,13 +46,20 @@ $ sudo ./build_dm.sh --download-url=file:///home/MYUSER/unixODBC-2.3.2.tar.gz --

###SQL Server ODBC Driver Installer - install.sh

For the driver installer - `install.sh` - `install`, `verify`, `--force`, and `--help`
For the driver installer - `install.sh` - `install`, `verify`, `--force`, `--force-debian`, `--force-redhat`, and `--help`
are available parameters:

```
$ sudo ./install.sh install
```

If you are using a Debian based/compatible distribution that is not detected properly (the current list is Debian,
Ubuntu, and LinuxMint), you may want to use the `--force-debian` install flag like this:

```
$ sudo ./install.sh install --force-debian
```

You can use verify to check the status of an existing installation:

```
Expand Down
17 changes: 14 additions & 3 deletions install.sh
Expand Up @@ -18,12 +18,15 @@ req_proc="x86_64";
req_dm_ver="2.3.2";
dm_name="unixODBC $req_dm_ver";
os_dist_id=`lsb_release -is`
is_this_debian_based="/etc/debian_version"
req_libs=""
deb_req_libs=( '~i"^libc6$"' '~i"libkrb5\-[0-9]$"' '~i"^e2fsprogs$"' '~i"^openssl$"' )
red_req_libs=( glibc e2fsprogs krb5-libs openssl )

if [ $os_dist_id == "Ubuntu" ] || [ $os_dist_id == "Debian" ]; then
req_libs=( '~i"^libc6$"' '~i"libkrb5\-[0-9]$"' '~i"^e2fsprogs$"' '~i"^openssl$"' )
if [ $os_dist_id == "Ubuntu" ] || [ $os_dist_id == "Debian" ] || [ $os_dist_id == "LinuxMint" ] || [ -e "$is_this_debian_based" ]; then
req_libs=deb_req_libs
else
req_libs=( glibc e2fsprogs krb5-libs openssl )
req_libs=red_req_libs
fi

#language of the install
Expand Down Expand Up @@ -164,6 +167,8 @@ function print_usage()
echo " defaults to the /opt/microsoft/msodbcsql/lib directory"
echo " --force - continues installation even if an error occurs"
echo " --accept-license - forgoes showing the EULA and implies agreement with its contents"
echo " --force-debian - forces the install to continue as a debian based/compatible linux distribution"
echo " --force-redhat - forces the install to continue as a redhat based/compatible linux distribution"
echo

# don't return if we're printing the usage
Expand Down Expand Up @@ -696,6 +701,12 @@ function process_params
--force)
force=1
;;
--force-debian)
req_libs=deb_req_libs
;;
--force-redhat)
req_libs=red_req_libs
;;
--bin-dir=*)
bin_sym_dir=${1##--bin-dir=}
bin_sym_dir=${bin_sym_dir/#"~"/$HOME}
Expand Down

0 comments on commit 8425497

Please sign in to comment.