replace vcs_relative_path with non-python, fixes #115

This commit is contained in:
Nextraztus
2015-08-07 08:22:18 -06:00
parent 7c73009461
commit fd78fb5ed3

View File

@@ -329,7 +329,11 @@ function enumerate_blackbox_repos() {
function vcs_relative_path() { function vcs_relative_path() {
# Usage: vcs_relative_path file # Usage: vcs_relative_path file
local name="$1" local name="$1"
python -c 'import os ; print(os.path.relpath("'"$(pwd -P)"'/'"$name"'", "'"$REPOBASE"'"))' #python -c 'import os ; print(os.path.relpath("'"$(pwd -P)"'/'"$name"'", "'"$REPOBASE"'"))'
local p=$( echo -n "$( pwd -P )/${1}" | sed 's#//*#/#g' )
local name="${p#$REPOBASE}"
name=$( echo -n "$name" | sed 's#^/##g' | sed 's#/$##g' )
echo -n $name
} }
# Removes a line from a text file # Removes a line from a text file