Merge pull request #171 from t8m/master
[openssl-web.git] / inc / common.tt
1 [% # Ensure dir contains no repeated slashes, and no ending slash
2    dir = dir.replace('//+', '/').replace('/$', '');
3    # Calculate the path to the top directory.
4    # It will always have an ending slash.
5    top = "";
6    IF dir != ".";
7      top = "../";
8      top = top.repeat(dir.split("/").size);
9    END -%]