diff --git a/meson.build b/meson.build index 899ba1f4..abb51f71 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('spdlog', ['cpp'], license : 'MIT', - version : run_command(find_program('extract_version.py')).stdout().strip(), + version : run_command(find_program('scripts/extract_version.py')).stdout().strip(), default_options : [ 'warning_level=3', 'cpp_std=c++11', diff --git a/clang_tidy.sh b/scripts/clang_tidy.sh similarity index 53% rename from clang_tidy.sh rename to scripts/clang_tidy.sh index 9ced07f1..8b1b5f88 100755 --- a/clang_tidy.sh +++ b/scripts/clang_tidy.sh @@ -1 +1,6 @@ +#!/bin/bash + +cd "$(dirname "$0")" +cd .. + clang-tidy example/example.cpp -- -I ./include diff --git a/extract_version.py b/scripts/extract_version.py similarity index 85% rename from extract_version.py rename to scripts/extract_version.py index a6f791e9..960df51b 100755 --- a/extract_version.py +++ b/scripts/extract_version.py @@ -3,7 +3,7 @@ import os import re -base_path = os.path.abspath(os.path.dirname(__file__)) +base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) config_h = os.path.join(base_path, 'include', 'spdlog', 'version.h') data = {'MAJOR': 0, 'MINOR': 0, 'PATCH': 0} reg = re.compile(r'^\s*#define\s+SPDLOG_VER_([A-Z]+)\s+([0-9]+).*$') diff --git a/format.sh b/scripts/format.sh similarity index 87% rename from format.sh rename to scripts/format.sh index 97bbea23..bffbb4c1 100755 --- a/format.sh +++ b/scripts/format.sh @@ -1,3 +1,8 @@ +#!/bin/bash + +cd "$(dirname "$0")" +cd .. + echo -n "Running dos2unix " find . -name "*\.h" -o -name "*\.cpp"|grep -v bundled|xargs -I {} sh -c "dos2unix '{}' 2>/dev/null; echo -n '.'" echo