-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBashCommands.py
38 lines (29 loc) · 972 Bytes
/
BashCommands.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import os
import subprocess
def RemoveFile(File):
os.remove(File)
def RunSingleCommand(Command):
os.system(Command)
#This file is used in the script to use bash commands
#Bu dosya programda bash komutlarını kullanmak için kullanılıyor
def Wget(url):
os.system("wget "+url)
#Run bash file
def RunSh(fileDirectory):
os.system("sh "+fileDirectory)
#
#Run bash commands
def RunCommands(Commands):
for Command in Commands:
os.system(Command)
#Run when installing a package
def StartRun():
Commands=["sudo pacman -S wget --noconfirm;sudo pacman -S base-devel --noconfirm;sudo pacman -S yaourt --noconfirm;sudo pacman-mirrors -g;sudo pacman -Syy --noconfirm"]
RunCommands(Commands)
#You can edit the install.sh with this functions
def EchoMulti(Commands):
os.system("echo -e"+Commands+">install.sh")
def EchoSingle(Commands):
os.system("echo "+Commands+">install.sh")
def EchoPass(Text):
os.system("echo "+Text+">pass.txt")