Commits

Rob Williams committed 5cdb42d

Refactor scripts into proper places

Comments (0)

Files changed (10)

bin/Python/run-sloccount

-#!/bin/bash
-# Run sloccount to count lines-of-code (LOC) in this project
-# NOTE:  Do NOT include subdirectories "dist", "out", or "PVE"
-
-echo "run-sloccount..."
-_Cmd=sloccount
-_Cmd="$_Cmd --addlangall --details --wide"
-_Cmd="$_Cmd ${BO_Project}/activate.bash"
-_Cmd="$_Cmd ${BO_Project}/activate_build_tools.bash"
-_Cmd="$_Cmd ${BO_Project}/README.txt"
-_Cmd="$_Cmd ${BO_Project}/setup.py"
-_Cmd="$_Cmd ${BO_Project}/bin"
-_Cmd="$_Cmd ${BO_Project}/cfg"
-_Cmd="$_Cmd ${BO_Project}/doc"
-_Cmd="$_Cmd ${BO_Project}/src"
-$_Cmd > ${BO_Project}/out/sloccount.sc
-

bin/all/run-sloccount

+#!/bin/bash
+# Run sloccount to count lines-of-code (LOC) in this project
+# NOTE:  Do NOT include subdirectories "dist", "out", or "PVE"
+
+echo "run-sloccount..."
+_Cmd=sloccount
+_Cmd="$_Cmd --addlangall --details --wide"
+_Cmd="$_Cmd ${BO_Project}/activate.bash"
+_Cmd="$_Cmd ${BO_Project}/activate_build_tools.bash"
+_Cmd="$_Cmd ${BO_Project}/README.txt"
+_Cmd="$_Cmd ${BO_Project}/setup.py"
+_Cmd="$_Cmd ${BO_Project}/bin"
+_Cmd="$_Cmd ${BO_Project}/cfg"
+_Cmd="$_Cmd ${BO_Project}/doc"
+_Cmd="$_Cmd ${BO_Project}/src"
+$_Cmd > ${BO_Project}/out/sloccount.sc
+

sample/Python/activate.bash

-#!/bin/bash
-# Activate this project
-
-echo 'WARN:  Should be executed as "source activate", was it?'
-
-# Dump incoming environment for troubleshooting
-env | sort > ./env.out
-
-# Remember the current directory as our project home
-export HomeProject=${PWD}
-
-source $HomeProject/project.env
-source $HomeProject/configure_build_tools
-source $HomeBuildTools/bin_shared/helper/configure_project

sample/Python/bin/run-sloccount

-#!/bin/bash
-# Run sloccount to count lines-of-code (LOC) in this project
-# NOTE:  Do NOT include subdirectories "dist", "out", or "PVE"
-
-echo "run-sloccount for the build project..."
-_Cmd=sloccount
-_Cmd="$_Cmd --addlangall --details --wide"
-_Cmd="$_Cmd ${BO_Project}/activate"
-_Cmd="$_Cmd ${BO_Project}/configure_build_tools"
-_Cmd="$_Cmd ${BO_Project}/project.env"
-_Cmd="$_Cmd ${BO_Project}/setup.py"
-_Cmd="$_Cmd ${BO_Project}/bin"
-_Cmd="$_Cmd ${BO_Project}/bin_shared"
-_Cmd="$_Cmd ${BO_Project}/cfg"
-_Cmd="$_Cmd ${BO_Project}/doc"
-_Cmd="$_Cmd ${BO_Project}/src"
-$_Cmd > ${BO_Project}/out/sloccount.sc
-

sample/Python/cfg/project-env.bash

+#!/bin/bash
+
+echo 'INFO:  Configure project (specific)'
+
+# Configure project home package (parent package of all project source)
+# NOTE:  All project source should be contained in
+#        ${HomeProject}/src/${HomePackage}
+export HomePackage=example
+
+# Configure build tools
+ParentBuildTools=~/tool/build
+RevisionBuildTools=tip
+
+# Configure PIP download cache
+[[   -z "$TMPDIR" ]] && \
+  echo 'FATAL: Missing value for $TMPDIR' && exit 1
+export PIP_DOWNLOAD_CACHE=$TMPDIR/pip

sample/Python/project-env.bash

-#!/bin/bash
-
-echo 'INFO:  Configure project (specific)'
-
-# Configure project home package (parent package of all project source)
-# NOTE:  All project source should be contained in
-#        ${HomeProject}/src/${HomePackage}
-export HomePackage=example
-
-# Configure build tools
-ParentBuildTools=~/tool/build
-RevisionBuildTools=tip
-
-# Configure PIP download cache
-[[   -z "$TMPDIR" ]] && \
-  echo 'FATAL: Missing value for $TMPDIR' && exit 1
-export PIP_DOWNLOAD_CACHE=$TMPDIR/pip

sample/activate_build_tools.bash

-#!/bin/bash
-
-echo 'INFO:  Configure build tools'
-
-[[   -z "$ParentBuildTools" ]] && \
-  echo 'FATAL: Missing value for $ParentBuildTools' && exit 1
-[[ ! -e "$ParentBuildTools" ]] && \
-  mkdir -p "$ParentBuildTools"
-[[ ! -d "$ParentBuildTools" ]] && \
-  echo "FATAL: Missing directory $ParentBuildTools" && exit 1
-[[   -z "$RevisionBuildTools" ]] && \
-  echo 'FATAL: Missing value for $RevisionBuildTools' && exit 1
-HomeBuildTools=$ParentBuildTools/$RevisionBuildTools
-[[   -z "$HomeBuildTools" ]] && \
-  echo 'FATAL: Missing value for $HomeBuildTools' && exit 1
-[[ ! -e "$HomeBuildTools" ]] && \
-  hg clone --rev "$RevisionBuildTools" "ssh://hg@bitbucket.org/robwilliams/build" "$HomeBuildTools"
-[[ ! -d "$HomeBuildTools" ]] && \
-  echo "FATAL: Missing directory $HomeBuildTools" && exit 1
-cd $HomeBuildTools
-hg fetch
-cd $HomeProject

sample/all/activate.bash

+#!/bin/bash
+# Activate this project
+
+echo 'WARN:  Should be executed as "source activate", was it?'
+
+# Dump incoming environment for troubleshooting
+env | sort > ./env.out
+
+# Remember the current directory as our project home
+export HomeProject=${PWD}
+
+source $HomeProject/project.env
+source $HomeProject/configure_build_tools
+source $HomeBuildTools/bin_shared/helper/configure_project

sample/all/activate_build_tools.bash

+#!/bin/bash
+
+echo 'INFO:  Configure build tools'
+
+[[   -z "$ParentBuildTools" ]] && \
+  echo 'FATAL: Missing value for $ParentBuildTools' && exit 1
+[[ ! -e "$ParentBuildTools" ]] && \
+  mkdir -p "$ParentBuildTools"
+[[ ! -d "$ParentBuildTools" ]] && \
+  echo "FATAL: Missing directory $ParentBuildTools" && exit 1
+[[   -z "$RevisionBuildTools" ]] && \
+  echo 'FATAL: Missing value for $RevisionBuildTools' && exit 1
+HomeBuildTools=$ParentBuildTools/$RevisionBuildTools
+[[   -z "$HomeBuildTools" ]] && \
+  echo 'FATAL: Missing value for $HomeBuildTools' && exit 1
+[[ ! -e "$HomeBuildTools" ]] && \
+  hg clone --rev "$RevisionBuildTools" "ssh://hg@bitbucket.org/robwilliams/build" "$HomeBuildTools"
+[[ ! -d "$HomeBuildTools" ]] && \
+  echo "FATAL: Missing directory $HomeBuildTools" && exit 1
+cd $HomeBuildTools
+hg fetch
+cd $HomeProject

sample/all/bin/run-sloccount

+#!/bin/bash
+# Run sloccount to count lines-of-code (LOC) in this project
+# NOTE:  Do NOT include subdirectories "dist", "out", or "PVE"
+
+echo "run-sloccount for the build project..."
+_Cmd=sloccount
+_Cmd="$_Cmd --addlangall --details --wide"
+_Cmd="$_Cmd ${BO_Project}/activate"
+_Cmd="$_Cmd ${BO_Project}/configure_build_tools"
+_Cmd="$_Cmd ${BO_Project}/project.env"
+_Cmd="$_Cmd ${BO_Project}/setup.py"
+_Cmd="$_Cmd ${BO_Project}/bin"
+_Cmd="$_Cmd ${BO_Project}/bin_shared"
+_Cmd="$_Cmd ${BO_Project}/cfg"
+_Cmd="$_Cmd ${BO_Project}/doc"
+_Cmd="$_Cmd ${BO_Project}/src"
+$_Cmd > ${BO_Project}/out/sloccount.sc
+