Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Commit

Permalink
Bug correction
Browse files Browse the repository at this point in the history
Create the Profiles/ folder if not found
  • Loading branch information
aeyno authored Nov 10, 2019
1 parent 2259da6 commit 72f88c4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions devSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def logo():
print(nc)

def isRoot():
#Verify whether the user is root or not
if subprocess.check_output("whoami").decode("utf-8") == "root\n":
return True
else:
Expand Down Expand Up @@ -545,14 +546,19 @@ def setProfile(self, profileName):
self.vsexts = "Profiles/" + profileName + "/vscodeextensions.txt"
self.zipList = "Profiles/" + profileName + "/zip.txt"

global p
p = Parameters()


if __name__ == '__main__':

if not isRoot():
print("please run as root")
exit()

if not os.path.isdir("Profiles/"):
os.mkdir("Profiles/")

global p
p = Parameters()
logo()

if len(sys.argv) > 1:
Expand Down

0 comments on commit 72f88c4

Please sign in to comment.