forked from p34709852/monkey
Simpler bash commands for linux PBA
This commit is contained in:
parent
a9c763cd9c
commit
e2d35ca267
|
@ -3,14 +3,11 @@ BASH_STARTUP_FILES = ["~/.bashrc", "~/.profile", "~/.bash_profile"]
|
|||
|
||||
def get_linux_commands_to_modify_shell_startup_files():
|
||||
return [
|
||||
'if [ -f {0} ] ;', # does the file exist?
|
||||
'then',
|
||||
'echo \"# Succesfully modified {0}\" |',
|
||||
'tee -a',
|
||||
'{0}', # add comment to file
|
||||
'echo \"# Succesfully modified {0}\"',
|
||||
'3<{0} 3<&- |', # check for existence of file
|
||||
'tee -a', # append to file
|
||||
'{0}',
|
||||
'&&',
|
||||
'sed -i \'$d\' {0} ;', # remove last line of file
|
||||
'else',
|
||||
'echo \"{0} does not exist\" ; fi' # mention if file does not exist
|
||||
'sed -i \'$d\' {0}', # remove last line of file
|
||||
],\
|
||||
BASH_STARTUP_FILES
|
||||
|
|
Loading…
Reference in New Issue