summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-04-09 13:59:55 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-04-23 09:57:35 -0700
commit10e42905241f541eefda4b174e9d4b18c8285400 (patch)
tree053d811ca4a5041341157c67a8a8c3b377690042 /bin
parentae3f45c11e3f934939b90445471da8f18b057bc5 (diff)
bin/install_megadrivers: rename a few variables to make things clearer
Originally the "each" variable was just a part of the "drivers" variable. It's not anymore so it's a bit ambiguous. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/install_megadrivers.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/install_megadrivers.py b/bin/install_megadrivers.py
index c04a2a3eb34..8d9ed9c6dce 100755
--- a/bin/install_megadrivers.py
+++ b/bin/install_megadrivers.py
@@ -46,23 +46,23 @@ def main():
os.makedirs(to)
shutil.copy(args.megadriver, master)
- for each in args.drivers:
- driver = os.path.join(to, each)
+ for driver in args.drivers:
+ abs_driver = os.path.join(to, driver)
- if os.path.exists(driver):
- os.unlink(driver)
- print('installing {} to {}'.format(args.megadriver, driver))
- os.link(master, driver)
+ if os.path.exists(abs_driver):
+ os.unlink(abs_driver)
+ print('installing {} to {}'.format(args.megadriver, abs_driver))
+ os.link(master, abs_driver)
try:
ret = os.getcwd()
os.chdir(to)
- name, ext = os.path.splitext(each)
+ name, ext = os.path.splitext(driver)
while ext != '.so':
if os.path.exists(name):
os.unlink(name)
- os.symlink(each, name)
+ os.symlink(driver, name)
name, ext = os.path.splitext(name)
finally:
os.chdir(ret)