From f4e98a5cda0c669d521f16710059ce24c166cc02 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 22 Nov 2017 11:06:09 +0100 Subject: [PATCH] Moved some scripts -> bin/ --- archive-old-homes.sh => bin/archive-old-homes.sh | 0 barracuda-sync => bin/barracuda-sync | 8 +++++--- format-du => bin/format-du | 8 +++++--- get-mounted-park-fs.sh => bin/get-mounted-park-fs.sh | 0 get-solaris-zones.sh => bin/get-solaris-zones.sh | 0 get_sieve => bin/get_sieve | 0 get_used_park.sh => bin/get_used_park.sh | 0 put_sieve => bin/put_sieve | 0 8 files changed, 10 insertions(+), 6 deletions(-) rename archive-old-homes.sh => bin/archive-old-homes.sh (100%) rename barracuda-sync => bin/barracuda-sync (77%) rename format-du => bin/format-du (76%) rename get-mounted-park-fs.sh => bin/get-mounted-park-fs.sh (100%) rename get-solaris-zones.sh => bin/get-solaris-zones.sh (100%) rename get_sieve => bin/get_sieve (100%) rename get_used_park.sh => bin/get_used_park.sh (100%) rename put_sieve => bin/put_sieve (100%) diff --git a/archive-old-homes.sh b/bin/archive-old-homes.sh similarity index 100% rename from archive-old-homes.sh rename to bin/archive-old-homes.sh diff --git a/barracuda-sync b/bin/barracuda-sync similarity index 77% rename from barracuda-sync rename to bin/barracuda-sync index 2d5fe69..8607c19 100755 --- a/barracuda-sync +++ b/bin/barracuda-sync @@ -11,9 +11,11 @@ cur_dir = os.getcwd() base_dir = cur_dir if sys.argv[0] != '' and sys.argv[0] != '-c': - cur_dir = os.path.dirname(sys.argv[0]) -if os.path.exists(os.path.join(cur_dir, 'pp_lib')): - sys.path.insert(0, os.path.abspath(cur_dir)) + bin_dir = os.path.dirname(sys.argv[0]) +base_dir = os.path.abspath(os.path.join(bin_dir, '..')) +module_dir = os.path.join(base_dir, 'pp_lib') +if os.path.exists(module_dir): + sys.path.insert(0, base_dir) from pp_lib.barracuda_sync_app import PpBarracudaSyncApp diff --git a/format-du b/bin/format-du similarity index 76% rename from format-du rename to bin/format-du index ae0becf..f26a00a 100755 --- a/format-du +++ b/bin/format-du @@ -11,9 +11,11 @@ cur_dir = os.getcwd() base_dir = cur_dir if sys.argv[0] != '' and sys.argv[0] != '-c': - cur_dir = os.path.dirname(sys.argv[0]) -if os.path.exists(os.path.join(cur_dir, 'pp_lib')): - sys.path.insert(0, os.path.abspath(cur_dir)) + bin_dir = os.path.dirname(sys.argv[0]) +base_dir = os.path.abspath(os.path.join(bin_dir, '..')) +module_dir = os.path.join(base_dir, 'pp_lib') +if os.path.exists(module_dir): + sys.path.insert(0, base_dir) from pp_lib.format_du import FormatDuApp diff --git a/get-mounted-park-fs.sh b/bin/get-mounted-park-fs.sh similarity index 100% rename from get-mounted-park-fs.sh rename to bin/get-mounted-park-fs.sh diff --git a/get-solaris-zones.sh b/bin/get-solaris-zones.sh similarity index 100% rename from get-solaris-zones.sh rename to bin/get-solaris-zones.sh diff --git a/get_sieve b/bin/get_sieve similarity index 100% rename from get_sieve rename to bin/get_sieve diff --git a/get_used_park.sh b/bin/get_used_park.sh similarity index 100% rename from get_used_park.sh rename to bin/get_used_park.sh diff --git a/put_sieve b/bin/put_sieve similarity index 100% rename from put_sieve rename to bin/put_sieve -- 2.39.5