From 3c1e39f246682352e7c035e2c646e66527200ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 2 May 2018 12:59:07 +0200 Subject: [PATCH] daca2-addons: make it work again --- tools/daca2-addons.py | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/tools/daca2-addons.py b/tools/daca2-addons.py index c1fec6025..0b796fdcb 100644 --- a/tools/daca2-addons.py +++ b/tools/daca2-addons.py @@ -1,10 +1,9 @@ #!/usr/bin/env python # -# 1. Create a folder daca2-addons in your HOME folder -# 2. Put cppcheck-O2 in daca2-addons. It should be built with all optimisations. -# 3. Optional: Put a file called "suppressions.txt" in the daca2-addons folder. -# 4. Optional: tweak FTPSERVER and FTPPATH in this script below. -# 5. Run the daca2-addons script: python daca2-addons.py FOLDER +# 1. Create the folder ~/daca2-addons +# 2. Put cppcheck-O2 in ~/daca2-addons. It should be built with all optimisations. +# 3. Optional: tweak FTPSERVER and FTPPATH in this script below. +# 4. Run the daca2-addons script: python daca2-addons.py FOLDER import subprocess import sys @@ -218,21 +217,16 @@ if not FOLDER: print('no folder given') sys.exit(1) +workdir = os.path.expanduser('~/daca2-addons/') +if not os.path.isdir(workdir + FOLDER): + os.makedirs(workdir + FOLDER) +os.chdir(workdir + FOLDER) + archives = getpackages(FOLDER) if len(archives) == 0: print('failed to load packages') sys.exit(1) -print('Sleep for 10 seconds..') -time.sleep(10) - -workdir = os.path.expanduser('~/daca2/') - -print('~/daca2/' + FOLDER) -if not os.path.isdir(workdir + FOLDER): - os.makedirs(workdir + FOLDER) -os.chdir(workdir + FOLDER) - try: results = open('results.txt', 'wt') results.write('STARTDATE ' + str(datetime.date.today()) + '\n')