root/gs2-extensions/xpdf-tools/trunk/src/move-cmake.sh @ 32256

Revision 32243, 2.4 KB (checked in by sjm84, 10 months ago)

Moving from CMake 3.11.4 to 3.9.6 because of an incompatibility with the installed version of g++ and the newer version of CMake on both Linux LSB and the Mac Mountain Lion machine. CMake 3.11.4 requires a newer verrsion of g++.

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3
4print_usage() {
5    echo ""
6    echo "RUN AS: $0 <away|back>"
7    echo "  in 'back' mode, any existing cmake products will be in the bin subfolder"
8    echo "     ready for compiling"
9    echo "  in 'away' mode, cmake products are moved away into the separate devel folder"
10    echo "     ready for tarring up xpdf-tools"
11    echo ""
12}
13
14
15if [ -z $GEXT_XPDFTOOLS ] ; then
16    source setup.bash > /dev/null
17fi
18
19if [ -z $1 ]; then
20    print_usage
21fi
22
23# installed dir is extension's GSDLOS/bin subfolder, develdir is devel/GSDLOS subfolder
24installed=$GEXTXPDFTOOLS_INSTALLED
25develdir=$GEXT_XPDFTOOLS/devel/$GSDLOS
26#cmake_version="cmake-3.11"
27cmake_version="cmake-3.9"
28
29if [ "x$1" == "xaway" ]; then
30    echo "away mode (moving out of the way)"
31    if [ -e "$installed/bin/cmake" ]; then
32   
33    echo "Moving cmake products in xpdftools' installed area into 'devel'"
34   
35    mkdir -p $develdir/bin
36    # 4 files in bin to move to devel/os/bin
37    mv $installed/bin/ccmake $installed/bin/cmake $develdir/bin
38    mv $installed/bin/cpack $installed/bin/ctest $develdir/bin
39   
40    # Could move the entire $installed/doc folder, as only cmake uses it
41    # and not xpdftools nor any other pkg in the xpdftools extension.
42    # If future-proofing, just move the cmake subfolder of doc
43    #mkdir -p $develdir/doc
44    #mv $installed/doc/$cmake_version $develdir/doc/.
45    if [ -d $develdir/doc ]; then
46        rm -rf $develdir/doc
47    fi
48    # Now move the $installed/doc folder as it contains only CMake stuff
49    mv $installed/doc $develdir/.
50   
51    if [ -d $develdir/share ]; then
52        rm -rf $develdir/share
53    fi
54    mkdir -p $develdir/share/aclocal
55    mv $installed/share/$cmake_version $develdir/share/.
56    mv $installed/share/aclocal/cmake.m4 $develdir/share/aclocal/.
57
58    else
59    echo "NOTE $installed/bin/cmake doesn't exist, so not moving anything"
60    fi
61# Do the reverse of the 'away' mode above for 'back' mode
62elif [ "x$1" == "xback" ]; then
63    echo "back mode (moving cmake back to where it was built)"
64    if [ -e "$develdir/bin/cmake" ]; then
65
66    echo "Moving cmake products from 'devel' back into xpdftools' installed area"
67
68    mv $develdir/bin/* $installed/bin/.
69
70    #mv $develdir/doc/* $installed/doc/.
71    mv $develdir/doc $installed/.
72
73    #if [ -e $develdir/share/aclocal/cmake.m4 ]; then
74    mv $develdir/share/$cmake_version $installed/share/.
75    mv $develdir/share/aclocal/cmake.m4 $installed/share/aclocal/.
76    #fi
77    else
78    echo "NOTE: $develdir/bin/cmake doesn't exist, so not moving anything"
79    fi
80fi
Note: See TracBrowser for help on using the browser.