Skip to content
Snippets Groups Projects
Commit 0989c6bc authored by Andrew Ferguson's avatar Andrew Ferguson
Browse files

Improve handling of directories with spaces

parent 67067bbe
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
d=$(dirname "$0")
d=$(dirname $0)
MAIN_CLASS=$1 MAIN_CLASS=$1
LIBRARIES=$2 LIBRARIES=$2
[ "${MAIN_CLASS}" ] || { echo "Run 'ant eclipse' to generate Eclipse project files"; exit 1; } [ "${MAIN_CLASS}" ] || { echo "Run 'ant eclipse' to generate Eclipse project files"; exit 1; }
cat >$d/.project <<EOF cat >"$d/.project" <<EOF
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>floodlight</name> <name>floodlight</name>
...@@ -27,7 +26,7 @@ cat >$d/.project <<EOF ...@@ -27,7 +26,7 @@ cat >$d/.project <<EOF
EOF EOF
cat >$d/.classpath <<EOF cat >"$d/.classpath" <<EOF
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" path="src/main/java" output="target/bin"/> <classpathentry kind="src" path="src/main/java" output="target/bin"/>
...@@ -43,7 +42,7 @@ cat >>$d/.classpath <<EOF ...@@ -43,7 +42,7 @@ cat >>$d/.classpath <<EOF
EOF EOF
done done
) )
cat >>$d/.classpath <<EOF cat >>"$d/.classpath" <<EOF
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/bin"/> <classpathentry kind="output" path="target/bin"/>
</classpath> </classpath>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment