]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/create-sys-script.py
tree-wide: use proper unicode © instead of (C) where we can
[thirdparty/systemd.git] / test / create-sys-script.py
index 24a00f7a93c9e96edc1c170b8865725fd043079d..d03ca2cbf97ac9c1c2f5c12d240ee0ede3517f7c 100755 (executable)
@@ -1,25 +1,13 @@
 #!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1+
 
 OUTFILE_HEADER = """#!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1+
 #
 # create-sys-script.py
 #
-# (C) 2017 Canonical Ltd.
+# © 2017 Canonical Ltd.
 # Author: Dan Streetman <dan.streetman@canonical.com>
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# systemd is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-#
 """
 
 # Use this only to (re-)create the test/sys-script.py script,
@@ -36,6 +24,7 @@ OUTFILE_MODE = 0o775
 
 OUTFILE_FUNCS = r"""
 import os, sys
+import shutil
 
 def d(path, mode):
     os.mkdir(path, mode)
@@ -58,6 +47,8 @@ if not os.path.isdir(sys.argv[1]):
 
 os.chdir(sys.argv[1])
 
+if os.path.exists('sys'):
+    shutil.rmtree('sys')
 """