Skip to content

Commit

Permalink
V0.8 fix destdir option
Browse files Browse the repository at this point in the history
  • Loading branch information
srinivamd committed Oct 30, 2022
1 parent 21497ef commit 9c606c1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions amdfwflashinst.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Author: Srinivasan Subramanian (srinivasan.subramanian@amd.com)
#
# Download and install the amdfwflash utility
# V0.8: destdir fix
# V0.7: tar saved ifwi after rollback, update
# V0.6: removed code duplication for apt update cmd
# V0.5: sbin
Expand Down Expand Up @@ -178,13 +179,12 @@ def list_devices():

# tar saved ifwi
def tar_saved_ifwi(args):
if args.destdir is True:
destdir = args.destdir[0]
else:
destdir = "./" # default current dir

# use timestamp to create unique tar filename
tar_cmd = TAR_CMD + " -cvf " + destdir + "saved_ifwi" + datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S") + ".tar " + "/tmp/amdfwflash/ifwi/backup "
tar_cmd = (TAR_CMD + " -cvf " + args.destdir[0] + "/" + "saved_ifwi"
+ datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S") + ".tar "
+ "/tmp/amdfwflash/ifwi/backup ")
print("Archiving save IFWI image: ")
print(tar_cmd)
try:
ps1 = subprocess.Popen(shlex.split(tar_cmd), bufsize=0).communicate()[0]
except subprocess.CalledProcessError as err:
Expand Down Expand Up @@ -495,7 +495,7 @@ def remove_debian_repo(args, fetchurl):
sys.exit(1)

# Log version and date of run
print("Running V0.7 amdfwflashinst.py utility for OS: " + ostype + " on: " + str(datetime.datetime.now()))
print("Running V0.8 amdfwflashinst.py utility for OS: " + ostype + " on: " + str(datetime.datetime.now()))

if is_amdgpu_driver_loaded():
print("amdgpu driver is LOADED. Please blacklist amdgpu and try again")
Expand Down

0 comments on commit 9c606c1

Please sign in to comment.