u
This commit is contained in:
		
							parent
							
								
									08fdf3c3fa
								
							
						
					
					
						commit
						728dcb521e
					
				
							
								
								
									
										47
									
								
								config-git.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										47
									
								
								config-git.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,47 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | echo "---------------------------------------------" | ||||||
|  | read -p "User Name to show in git log (leave blank for no change) >>> " UserName | ||||||
|  | if [ $UserName ] | ||||||
|  | then | ||||||
|  |   echo "git config --global user.name $UserName" | ||||||
|  |   git config --global user.name $UserName | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | echo "---------------------------------------------" | ||||||
|  | read -p "User Email to show in git log (leave blank for no change) >>> " UserEmail | ||||||
|  | if [ $UserEmail ] | ||||||
|  | then | ||||||
|  |   echo "git config --global user.email $UserEmail" | ||||||
|  |   git config --global user.email $UserEmail | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | echo "---------------------------------------------" | ||||||
|  | echo "如果 git 远程服务器的 ssl 证书过期,或者使用了自颁发的证书,连接时会出现验证错误 Cannot verify local issuer" | ||||||
|  | read -p "Force connect even if ssl failed verification? (true or false, blank for no change) >> " HttpSslVerify | ||||||
|  | if [ $HttpSslVerify ] | ||||||
|  | then | ||||||
|  |   echo "git config --global http.sslVerify $HttpSslVerify" | ||||||
|  |   git config --global http.sslVerify $HttpSslVerify | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | echo "---------------------------------------------" | ||||||
|  | read -p "Store credential in cache or store? (leave blank for no change) >> " CredentialHelper | ||||||
|  | if [ $CredentialHelper ] | ||||||
|  | then | ||||||
|  |   echo "git config --global credential.helper $CredentialHelper" | ||||||
|  |   git config --global credential.helper $CredentialHelper | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | echo "---------------------------------------------" | ||||||
|  | read -p "Path to global gitignore file? (For example ~/.gitignore, leave blank for no change) >> " ExcludesFile | ||||||
|  | if [ $ExcludesFile ] | ||||||
|  | then | ||||||
|  |   if [ -e $ExcludesFile ] | ||||||
|  |   then | ||||||
|  |     echo "git config --global core.excludesfile $ExcludesFile" | ||||||
|  |     git config --global core.excludesfile $ExcludesFile | ||||||
|  |   else | ||||||
|  |     echo "File not exsit: $ExcludesFile" | ||||||
|  |   fi | ||||||
|  | fi | ||||||
| @ -10,44 +10,64 @@ else | |||||||
|   read -p "Enter config source path (leave blank for /faronear/lib/sysconfig/home) >> " SourcePath |   read -p "Enter config source path (leave blank for /faronear/lib/sysconfig/home) >> " SourcePath | ||||||
|   if [ ! $SourcePath ] |   if [ ! $SourcePath ] | ||||||
|   then |   then | ||||||
|     echo Use default source path: /faronear/lib/sysconfig/home |     echo "Use default source path: /faronear/lib/sysconfig/home" | ||||||
|     SourcePath=/faronear/lib/sysconfig/home |     SourcePath=/faronear/lib/sysconfig/home | ||||||
|   fi |   fi | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| if [ ! -d $SourcePath ] | if [ ! -d $SourcePath ] | ||||||
| then | then | ||||||
|   echo !!! Not existing $SourcePath, please try again |   echo "!!! Not existing $SourcePath, please try again" | ||||||
| else | else | ||||||
|   echo "Config home from $SourcePath" |   echo "Config home from $SourcePath" | ||||||
|  | 
 | ||||||
|  |   echo "---------------------------------------------" | ||||||
|   if [ -e ~/.emacs ] |   if [ -e ~/.emacs ] | ||||||
|   then |   then | ||||||
|     mv ~/.emacs ~/.emacs.backup |     mv ~/.emacs ~/.emacs.backup | ||||||
|   fi |   fi | ||||||
|   rm -fr ~/.emacs |   rm -fr ~/.emacs | ||||||
|   ln -s $SourcePath/.emacs ~/ |   ln -s $SourcePath/.emacs ~/ | ||||||
|  |   echo Linked ~/.emacs to $SourcePath/.emacs | ||||||
| 
 | 
 | ||||||
|  |   echo "---------------------------------------------" | ||||||
|   if [ -e ~/.emacs.lisp ] |   if [ -e ~/.emacs.lisp ] | ||||||
|   then |   then | ||||||
|     mv ~/.emacs.lisp ~/.emacs.lisp.backup |     mv ~/.emacs.lisp ~/.emacs.lisp.backup | ||||||
|   fi |   fi | ||||||
|   rm -fr ~/.emacs.lisp |   rm -fr ~/.emacs.lisp | ||||||
|   ln -s $SourcePath/.emacs.lisp ~/ |   ln -s $SourcePath/.emacs.lisp ~/ | ||||||
|  |   echo Linked ~/.emacs.lisp to $SourcePath/.emacs.lisp | ||||||
| 
 | 
 | ||||||
|  |   echo "---------------------------------------------" | ||||||
|   if [ -e ~/.bashrc ] |   if [ -e ~/.bashrc ] | ||||||
|   then |   then | ||||||
|     mv ~/.bashrc ~/.bashrc.backup |     mv ~/.bashrc ~/.bashrc.backup | ||||||
|   fi |   fi | ||||||
|   rm -fr ~/.bashrc |   rm -fr ~/.bashrc | ||||||
|   ln -s $SourcePath/.bashrc ~/ |   ln -s $SourcePath/.bashrc ~/ | ||||||
|  |   echo Linked ~/.bashrc to $SourcePath/.bashrc | ||||||
| 
 | 
 | ||||||
|  |   echo "---------------------------------------------" | ||||||
|   if [ -e ~/.bash_profile ] |   if [ -e ~/.bash_profile ] | ||||||
|   then |   then | ||||||
|     mv ~/.bash_profile ~/.bash_profile.backup |     mv ~/.bash_profile ~/.bash_profile.backup | ||||||
|   fi |   fi | ||||||
|   rm -fr ~/.bash_profile |   rm -fr ~/.bash_profile | ||||||
|   ln -s $SourcePath/.bash_profile ~/ |   ln -s $SourcePath/.bash_profile ~/ | ||||||
|  |   echo Linked ~/.bash_profile to $SourcePath/.bash_profile | ||||||
| 
 | 
 | ||||||
|  |   echo "---------------------------------------------" | ||||||
|  |   if [ -e ~/.gitignore ] | ||||||
|  |   then | ||||||
|  |     mv ~/.gitignore ~/.gitignore.backup | ||||||
|  |   fi | ||||||
|  |   rm -fr ~/.gitignore | ||||||
|  |   ln -s $SourcePath/.gitignore ~/ | ||||||
|  |   echo Linked ~/.gitignore to $SourcePath/.gitignore | ||||||
|  | 
 | ||||||
|  |   echo "---------------------------------------------" | ||||||
|  |   echo Executing ~/.bashrc | ||||||
|   . ~/.bashrc |   . ~/.bashrc | ||||||
| 
 | 
 | ||||||
|   echo "^_^ Home Setting Complete" |   echo "^_^ Home Setting Complete" | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								config-mac.sh
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										4
									
								
								config-mac.sh
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| @ -8,4 +8,8 @@ defaults write com.apple.Dock autohide-delay -float 0 | |||||||
| 
 | 
 | ||||||
| defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES | defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES | ||||||
| 
 | 
 | ||||||
|  | # Don't create .DS_Store files  | ||||||
|  | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE | ||||||
|  | # To enable: defaults delete com.apple.desktopservices DSDontWriteNetworkStores | ||||||
|  | 
 | ||||||
| killall Dock | killall Dock | ||||||
|  | |||||||
							
								
								
									
										22
									
								
								home/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								home/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | |||||||
|  | .DS_Store | ||||||
|  | Thumbs.db | ||||||
|  | node_modules/ | ||||||
|  | npm-debug.log* | ||||||
|  | yarn-debug.log* | ||||||
|  | yarn-error.log* | ||||||
|  | /test/unit/coverage/ | ||||||
|  | /test/e2e/reports/ | ||||||
|  | selenium-debug.log | ||||||
|  | 
 | ||||||
|  | # Editor directories and files | ||||||
|  | .idea | ||||||
|  | .vscode | ||||||
|  | *.suo | ||||||
|  | *.ntvs* | ||||||
|  | *.njsproj | ||||||
|  | *.sln | ||||||
|  | /package-lock.json | ||||||
|  | 
 | ||||||
|  | # Microsoft Office temporary files | ||||||
|  | ~$* | ||||||
|  | 
 | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user