Skip to content
Snippets Groups Projects
Commit 35af74f6 authored by Sven Gundlach's avatar Sven Gundlach
Browse files

fix setup scripts

parent 2cf1d516
Branches
Tags
No related merge requests found
...@@ -8,13 +8,13 @@ nameOfRelease = "org.oceandsl.configuration.ide-1.3.0-SNAPSHOT-ls.jar" ...@@ -8,13 +8,13 @@ nameOfRelease = "org.oceandsl.configuration.ide-1.3.0-SNAPSHOT-ls.jar"
pathToJar = "/home/" + getpass.getuser() + "/bin/" + nameOfRelease pathToJar = "/home/" + getpass.getuser() + "/bin/" + nameOfRelease
#get the newest oceandsl lsp #get the newest oceandsl lsp
os.system("sudo apt update && sudo apt install emacs") os.system("sudo apt update && sudo apt -y install emacs")
Path(path.expanduser("~/temp")).mkdir(parents=True, exist_ok=True) Path(path.expanduser("~/temp")).mkdir(parents=True, exist_ok=True)
Path(path.expanduser("~/bin")).mkdir(parents=True, exist_ok=True) Path(path.expanduser("~/bin")).mkdir(parents=True, exist_ok=True)
os.system("wget -O " + "~/bin/" + nameOfRelease + " " + gitRepo + "/-/raw/master/" + nameOfRelease) os.system("wget -O " + "~/bin/" + nameOfRelease + " " + gitRepo + "/-/raw/master/" + nameOfRelease)
#get the newest oceandsl-mode for emacs #get the newest oceandsl-mode for emacs
os.system("wget -O ~/bin/ " + gitRepo + "/-/raw/master/oceandsl-mode.el") os.system("wget -O ~/bin/oceandsl-mode.el " + gitRepo + "/-/raw/master/oceandsl-mode.el")
data = Path(path.expanduser("~/bin/oceandsl-mode.el")).read_text().replace("kali", getpass.getuser()) data = Path(path.expanduser("~/bin/oceandsl-mode.el")).read_text().replace("kali", getpass.getuser())
Path(path.expanduser("~/bin/oceandsl-mode.el")).write_text(data) Path(path.expanduser("~/bin/oceandsl-mode.el")).write_text(data)
......
...@@ -8,16 +8,15 @@ nameOfRelease = "org.oceandsl.configuration.ide-1.3.0-SNAPSHOT-ls.jar" ...@@ -8,16 +8,15 @@ nameOfRelease = "org.oceandsl.configuration.ide-1.3.0-SNAPSHOT-ls.jar"
pathToJar = "/home/" + getpass.getuser() + "/bin/" + nameOfRelease pathToJar = "/home/" + getpass.getuser() + "/bin/" + nameOfRelease
os.system("sudo apt update && sudo apt install vim") os.system("sudo apt update && sudo apt -y install vim")
Path(path.expanduser("~/temp")).mkdir(parents=True, exist_ok=True) Path(path.expanduser("~/temp")).mkdir(parents=True, exist_ok=True)
#print(path.expanduser("~/bin")) #print(path.expanduser("~/bin"))
Path(path.expanduser("~/bin")).mkdir(parents=True, exist_ok=True) Path(path.expanduser("~/bin")).mkdir(parents=True, exist_ok=True)
os.system("wget -O " + "~/bin/" + nameOfRelease + " " + gitRepo + "/-/raw/master/" + nameOfRelease) os.system("wget -O " + "~/bin/" + nameOfRelease + " " + gitRepo + "/-/raw/master/" + nameOfRelease)
os.system("wget -O ~/temp/example.vimrc " + gitRepo + "/-/raw/master/example.vimrc") os.system("wget -O ~/temp/example.vimrc " + gitRepo + "/-/raw/master/example.vimrc")
#Wenn .vimrc schon existiert müssen wir entweder mergen oder der entsprechende Code ist auch schon vorhanden dann müssen wir nichts tun #if .vimrc already exists we either need to merge or it already exists then we don't need to do anything
if(os.path.exists(path.expanduser("~/.vimrc"))): if(os.path.exists(path.expanduser("~/.vimrc"))):
newData = Path(path.expanduser("~/temp/example.vimrc")).read_text().replace(nameOfRelease, pathToJar) newData = Path(path.expanduser("~/temp/example.vimrc")).read_text().replace(nameOfRelease, pathToJar)
oldData = Path(path.expanduser("~/.vimrc")).read_text() oldData = Path(path.expanduser("~/.vimrc")).read_text()
...@@ -31,12 +30,9 @@ else: ...@@ -31,12 +30,9 @@ else:
data = Path(path.expanduser("~/.vimrc")).read_text().replace(nameOfRelease, pathToJar) data = Path(path.expanduser("~/.vimrc")).read_text().replace(nameOfRelease, pathToJar)
Path(path.expanduser("~/.vimrc")).write_text(data) Path(path.expanduser("~/.vimrc")).write_text(data)
Path(path.expanduser("~/.vim")).mkdir(parents=True, exist_ok=True) Path(path.expanduser("~/.vim")).mkdir(parents=True, exist_ok=True)
#Die Plugins werden installiert #install plugins
os.system("vim +slient +PlugInstall +qall") os.system("vim +slient +PlugInstall +qall")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment