kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #15357
Re: [PATCH] kicad-install.sh: Enhanced Error Handling with outcomes of cmake and make
Great! Thank you very much Wayne. --Joe
On Monday, October 20, 2014 8:40 AM, Wayne Stambaugh <stambaughw@xxxxxxxxxxx> wrote:
Patch committed in product branch r5207. I added a missing exit if the
package install fails and I also changed the rpm install code to match
the changes made to the deb package install. Thank you for your
contribution to kicad.
Kind Regards,
Wayne
On 10/14/2014 8:57 PM, Joseph Chen wrote:
> Here is the patch (attached as well) for enhancing "kicad-install.sh"
> handling of two error situations with Debian/Ubuntu:
>
> 1. The prerequisites are installed individually, rather than a
> grouped. Thus it avoids failing for ALL of the group.
> 2. The script stops when either cmake or make fails. Thus it avoids a
> false installation.
>
> The patch has been tested and passed with Ubuntu 14.04 LTS.
>
> --Joe
>
>
> --- old/kicad-install.sh 2014-10-14 18:41:37.834788832 -0600
> +++ new/kicad-install.sh 2014-10-14 18:41:13.462986918 -0600
> @@ -89,21 +89,26 @@
> # assume all these Debian, Mint, Ubuntu systems have same prerequisites
> if [ "$(expr match "$PM" '.*\(apt-get\)')" == "apt-get" ]; then
> #echo "debian compatible system"
> - sudo apt-get install \
> - bzr \
> - bzrtools \
> - build-essential \
> - cmake \
> - cmake-curses-gui \
> - debhelper \
> - doxygen \
> - grep \
> - libbz2-dev \
> - libcairo2-dev \
> - libglew-dev \
> - libssl-dev \
> - libwxgtk3.0-dev \
> + prerequisite_list="
> + bzr
> + bzrtools
> + build-essential
> + cmake
> + cmake-curses-gui
> + debhelper
> + doxygen
> + grep
> + libbz2-dev
> + libcairo2-dev
> + libglew-dev
> + libssl-dev
> + libwxgtk3.0-dev
> python-wxgtk3.0
> + "
> + for p in ${prerequisite_list}
> + do
> + sudo apt-get install $p
> + done
>
> # assume all yum systems have same prerequisites
> elif [ "$(expr match "$PM" '.*\(yum\)')" == "yum" ]; then
> @@ -255,14 +260,14 @@
> cd kicad.bzr
> if [ ! -d "build" ]; then
> mkdir build && cd build
> - cmake $OPTS ../
> + cmake $OPTS ../ || exit 1
> else
> cd build
> # Although a "make clean" is sometimes needed, more often than
> not it slows down the update
> # more than it is worth. Do it manually if you need to in this
> directory.
> # make clean
> fi
> - make -j4
> + make -j4 || exit 1
> echo " kicad compiled."
>
>
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp
References