summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mscp.h1
-rw-r--r--include/mscp_version.h.in1
-rw-r--r--src/atomic.h1
-rw-r--r--src/fileops.c1
-rw-r--r--src/fileops.h2
-rw-r--r--src/main.c1
-rw-r--r--src/message.c1
-rw-r--r--src/message.h1
-rw-r--r--src/mscp.c1
-rw-r--r--src/path.c1
-rw-r--r--src/path.h1
-rw-r--r--src/platform.c1
-rw-r--r--src/platform.h1
-rw-r--r--src/pymscp.c1
-rwxr-xr-xsrc/rename-logic.py48
-rw-r--r--src/ssh.c1
-rw-r--r--src/ssh.h1
-rw-r--r--src/util.h1
18 files changed, 17 insertions, 49 deletions
diff --git a/include/mscp.h b/include/mscp.h
index 5a856b6..b9724f8 100644
--- a/include/mscp.h
+++ b/include/mscp.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#ifndef _MSCP_H_
#define _MSCP_H_
diff --git a/include/mscp_version.h.in b/include/mscp_version.h.in
index 7fcaa58..f442533 100644
--- a/include/mscp_version.h.in
+++ b/include/mscp_version.h.in
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#ifndef _MSCP_VERSION_H_
#define _MSCP_VERSION_H_
diff --git a/src/atomic.h b/src/atomic.h
index 09f9f57..fc00788 100644
--- a/src/atomic.h
+++ b/src/atomic.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#ifndef _ATOMIC_H_
#define _ATOMIC_H_
diff --git a/src/fileops.c b/src/fileops.c
index 78cc937..6f55ca9 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#include <stdlib.h>
#include <string.h>
#include <errno.h>
diff --git a/src/fileops.h b/src/fileops.h
index cd35992..1c4d638 100644
--- a/src/fileops.h
+++ b/src/fileops.h
@@ -1,4 +1,4 @@
-
+/* SPDX-License-Identifier: GPL-3.0-only */
#include <dirent.h>
#include <sys/stat.h>
#include <glob.h>
diff --git a/src/main.c b/src/main.c
index c51bcb4..96bb9f3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
diff --git a/src/message.c b/src/message.c
index 8dd8c57..ff79675 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
diff --git a/src/message.h b/src/message.h
index 8f444b4..673f45c 100644
--- a/src/message.h
+++ b/src/message.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#ifndef _MESSAGE_H_
#define _MESSAGE_H_
diff --git a/src/mscp.c b/src/mscp.c
index 9989d54..e0f3dcb 100644
--- a/src/mscp.c
+++ b/src/mscp.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#include <stdbool.h>
#include <unistd.h>
#include <math.h>
diff --git a/src/path.c b/src/path.c
index 5c70795..2d46953 100644
--- a/src/path.c
+++ b/src/path.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#include <string.h>
#include <unistd.h>
#include <dirent.h>
diff --git a/src/path.h b/src/path.h
index ffef60b..072cc79 100644
--- a/src/path.h
+++ b/src/path.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#ifndef _PATH_H_
#define _PATH_H_
diff --git a/src/platform.c b/src/platform.c
index 1a8357d..6eac132 100644
--- a/src/platform.c
+++ b/src/platform.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#ifdef __APPLE__
#include <stdlib.h>
#include <sys/types.h>
diff --git a/src/platform.h b/src/platform.h
index 4905db0..c0f6f66 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#ifndef _PLATFORM_H_
#define _PLATFORM_H_
diff --git a/src/pymscp.c b/src/pymscp.c
index 62b2f0d..6c7f628 100644
--- a/src/pymscp.c
+++ b/src/pymscp.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <errno.h>
diff --git a/src/rename-logic.py b/src/rename-logic.py
deleted file mode 100755
index 6f6a4ec..0000000
--- a/src/rename-logic.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env python3
-
-from os.path import dirname, basename, isfile, isdir, exists
-from os import listdir
-import sys
-
-"""
-
-This file simply implements the src_path to dst_path conversion logic
-just for test. file_fill() and file_fill_recursive() in file.c
-implements this logic.
-
-"""
-
-
-def recursive(src, rel_path, dst, dst_should_dir, replace_dir_name):
-
- if isfile(src):
- if dst_should_dir:
- print("{} => {}/{}{}".format(src, dst, rel_path, basename(src)))
- else:
- print("{} => {}{}".format(src, rel_path, dst))
- return
-
- # src is directory
- for f in listdir(src):
- next_src = "{}/{}".format(src, f)
- if replace_dir_name and dst_should_dir:
- next_rel_path = ""
- else:
- next_rel_path = "{}{}/".format(rel_path, basename(src))
- recursive(next_src, next_rel_path, dst, dst_should_dir, False)
-
-
-def fill_dst(srclist, dst):
- dst_must_dir = len(srclist) > 1
- for src in srclist:
- dst_should_dir = isdir(src) | isdir(dst)
- replace_dir_name = not isdir(dst)
- recursive(src, "", dst, dst_should_dir | dst_must_dir, replace_dir_name)
-
-
-def main():
- if (len(sys.argv) < 2):
- print("usage: {} source ... target".format(sys.argv[0]))
- fill_dst(sys.argv[1:len(sys.argv) - 1], sys.argv[len(sys.argv) - 1])
-
-main()
diff --git a/src/ssh.c b/src/ssh.c
index eceb71c..1e223c3 100644
--- a/src/ssh.c
+++ b/src/ssh.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#include <stdio.h>
#include <string.h>
#include <unistd.h>
diff --git a/src/ssh.h b/src/ssh.h
index 126bfc3..b520cd4 100644
--- a/src/ssh.h
+++ b/src/ssh.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#ifndef _SSH_H_
#define _SSH_H_
diff --git a/src/util.h b/src/util.h
index 87b181d..e678db0 100644
--- a/src/util.h
+++ b/src/util.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-3.0-only */
#ifndef _UTIL_H_
#define _UTIL_H_