Review Board 1.7.22


SQOOP-968 Cannot build when in a directory with spaces

Review Request #10129 - Created March 25, 2013 and submitted

Abraham Elmahrek
SQOOP-968
Reviewers
Sqoop
jarcec, kate
sqoop-trunk
commit ed98f5cdf13ad6e802f7134fa75d3badec86966c
Author: Abraham Elmahrek <abraham@elmahrek.com>
Date:   Mon Mar 25 15:34:23 2013 -0700

    SQOOP-968 Cannot build when in a directory with spaces

:100755 100755 c227fbd... 70ce3c7... M	src/scripts/write-version-info.sh
Ran 'ant' in directory with spaces in it.

Diff revision 1 (Latest)

  1. src/scripts/write-version-info.sh: Loading...
src/scripts/write-version-info.sh
Revision c227fbd New Change
[20] 27 lines
[+20]
28

    
   
28

   
29
buildroot=$1
29
buildroot=$1
30
version=$2
30
version=$2
31
specifiedgithash=$3
31
specifiedgithash=$3
32

    
   
32

   
33
outputdir=${buildroot}/src/com/cloudera/sqoop
33
outputdir="${buildroot}/src/com/cloudera/sqoop"
34
outputfile=${outputdir}/SqoopVersion.java
34
outputfile="${outputdir}/SqoopVersion.java"
35

    
   
35

   
36
newoutputdir=${buildroot}/src/org/apache/sqoop
36
newoutputdir="${buildroot}/src/org/apache/sqoop"
37
newoutputfile=${newoutputdir}/SqoopVersion.java
37
newoutputfile="${newoutputdir}/SqoopVersion.java"
38

    
   
38

   
39
signature=$specifiedgithash
39
signature=$specifiedgithash
40
if [ -z "$signature" ]; then
40
if [ -z "$signature" ]; then
41
  signature=`git log -1 --pretty=format:%H`
41
  signature=`git log -1 --pretty=format:%H`
42
fi
42
fi
43

    
   
43

   
44
host=`hostname`
44
host=`hostname`
45
compiledate=`date`
45
compiledate=`date`
46

    
   
46

   
47
mkdir -p ${outputdir}
47
mkdir -p "${outputdir}"
48
cat > ${outputfile} <<EOF
48
cat > "${outputfile}" <<EOF
49
// generated by src/scripts/write-version-info.sh
49
// generated by src/scripts/write-version-info.sh
50
package com.cloudera.sqoop;
50
package com.cloudera.sqoop;
51

    
   
51

   
52
/**
52
/**
53
 * @deprecated use org.apache.sqoop.SqoopVersion instead
53
 * @deprecated use org.apache.sqoop.SqoopVersion instead
[+20] [20] 13 lines
[+20]
67
    org.apache.sqoop.SqoopVersion.COMPILE_DATE;
67
    org.apache.sqoop.SqoopVersion.COMPILE_DATE;
68
}
68
}
69
EOF
69
EOF
70

    
   
70

   
71

    
   
71

   
72
mkdir -p ${newoutputdir}
72
mkdir -p "${newoutputdir}"
73
cat > ${newoutputfile} <<EOF
73
cat > "${newoutputfile}" <<EOF
74
// generated by src/scripts/write-version-info.sh
74
// generated by src/scripts/write-version-info.sh
75
package org.apache.sqoop;
75
package org.apache.sqoop;
76

    
   
76

   
77
public class SqoopVersion {
77
public class SqoopVersion {
78
  public SqoopVersion() {
78
  public SqoopVersion() {
[+20] [20] 16 lines
  1. src/scripts/write-version-info.sh: Loading...