Refactor python scripts.

Change-Id: I442f5bf081d89369f7c71b0de2c99fd39b3ff942
Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
This commit is contained in:
Pawel Cieslak
2019-11-26 17:55:15 +01:00
committed by sys_ocldev
parent 6cc84c7bc4
commit 1d4d806933
4 changed files with 223 additions and 200 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (C) 2018 Intel Corporation
# Copyright (C) 2018-2019 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -8,8 +8,8 @@
converter=$(dirname $(readlink -f $0))/set_copyright.py
if [ "${1:-STAGED}" = "HEAD" ]; then
git diff-tree --no-commit-id --name-only -r HEAD | xargs -n 1 python $converter
git diff-tree --no-commit-id --name-only -r HEAD | xargs -n 1 $converter
else
git diff --cached --name-only | xargs -n 1 python $converter
git diff --cached --name-only | xargs -n 1 $converter
git diff --name-only | xargs -n 1 echo "Not scanned: "
fi