skripte eingefügt
This commit is contained in:
		
							parent
							
								
									49aafb6648
								
							
						
					
					
						commit
						9e905dc56a
					
				| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
# mkcdir
 | 
			
		||||
# Erstellt einen Ordner und wechselt hinein
 | 
			
		||||
 | 
			
		||||
mkcdir()
 | 
			
		||||
{
 | 
			
		||||
mkdir -p -- "$1" &&
 | 
			
		||||
	cd -P -- "$1"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Doch
 | 
			
		||||
# führt den letzten Befehl noch einmal als sudo aus
 | 
			
		||||
# zsh:
 | 
			
		||||
alias doch='sudo $(fc -ln -1)'
 | 
			
		||||
#bash:
 | 
			
		||||
alias doch='sudo $(history -p !-1)'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# newgit
 | 
			
		||||
# legt neues Repository an und pusht zu Server
 | 
			
		||||
newgit()
 | 
			
		||||
{
 | 
			
		||||
mkcdir "$1" &&
 | 
			
		||||
git init &&
 | 
			
		||||
git checkout -b main &&
 | 
			
		||||
touch README.md &&
 | 
			
		||||
git add . &&
 | 
			
		||||
git commit -a -m "initial commit" &&
 | 
			
		||||
git remote add origin https://git.boergmann.it/klaas/"$1".git &&
 | 
			
		||||
git push -u origin main
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue