u
This commit is contained in:
		
							parent
							
								
									69f77d929b
								
							
						
					
					
						commit
						6751a5bb76
					
				
							
								
								
									
										63
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										63
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,63 +0,0 @@ | ||||
| # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||||
| 
 | ||||
| node_modules/ | ||||
| /test/unit/coverage/ | ||||
| /test/e2e/reports/ | ||||
| .svn/ | ||||
| .idea/ | ||||
| .sass-cache/ | ||||
| .deploy_git/ | ||||
| .gitattributes | ||||
| _desktop.ini | ||||
| .DS_Store | ||||
| .thumbnails | ||||
| Thumbs.db | ||||
| thumbs.db | ||||
| .umi | ||||
| .umi-production | ||||
| npm-debug.log* | ||||
| yarn-debug.log* | ||||
| yarn-error.log* | ||||
| selenium-debug.log | ||||
| package-lock.json | ||||
| *.iml | ||||
| *.njsproj | ||||
| *.ntvs* | ||||
| *.sln | ||||
| *.suo | ||||
| ._* | ||||
| .$* | ||||
| ~$* | ||||
| 
 | ||||
| .bashrc_custom | ||||
| 
 | ||||
| # hexo | ||||
| db.json | ||||
| 
 | ||||
| # 客户端 uniapp 项目 | ||||
| /unpackage/* | ||||
| !/unpackage/res/ | ||||
| 
 | ||||
| /_archive/* | ||||
| /_datastore/* | ||||
| /_logstore/* | ||||
| /_filestore/* | ||||
| /_webroot/* | ||||
| /dist/ | ||||
| *.apk | ||||
| *.min.js | ||||
| *.min.css | ||||
| *.min.html | ||||
| /pages4loader.json5 | ||||
| envar-web-custom.js | ||||
| envar-deploy-secret.js | ||||
| 
 | ||||
| # hexo 项目 | ||||
| public/ | ||||
| 
 | ||||
| # 服务端(server or uniapp-uniCloud)项目 | ||||
| envar-base-custom.js | ||||
| envar-base-dynamic.js | ||||
| envar-base-secret.js | ||||
| 
 | ||||
| !.gitkeep | ||||
| @ -58,7 +58,6 @@ git clone https://git.faronear.org/tic/cloud-server | ||||
| git clone https://git.faronear.org/tic/cloud-user-vue | ||||
| git clone https://git.faronear.org/tic/star-core-torm | ||||
| git clone https://git.faronear.org/tic/star-lens-uniapp | ||||
| git clone https://git.faronear.org/tic/star-lens-vue | ||||
| git clone https://git.faronear.org/tic/tic-blog-hexo | ||||
| git clone https://git.faronear.org/tic/tic-www-vue | ||||
| 
 | ||||
|  | ||||
| @ -48,38 +48,54 @@ fi | ||||
| 
 | ||||
| if [ -d "$HomePath" ] | ||||
| then | ||||
| 
 | ||||
|   pushd $HomePath | ||||
|    | ||||
|   homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore" | ||||
|   echo | ||||
|   echo "=== Copy or link scripts? <l> for link, <anything else> for copy:" | ||||
|   echo "=== Copy or link scripts? <l> to link, <c> to copy, <anything else> to omit:" | ||||
|   read -p ">>> " CopyOrLinkScripts | ||||
|   for homescript in $homescriptlist | ||||
|   do | ||||
|     if [ -e "$homescript" ] | ||||
|     then | ||||
|       mv $homescript $homescript.backup-$(date +%Y%m%d%H%M%S) | ||||
|     fi | ||||
|     if [ "$CopyOrLinkScripts" = 'l' ] | ||||
|     then | ||||
|   if [ "$CopyOrLinkScripts" == 'l' ] | ||||
|   then | ||||
|     for homescript in $homescriptlist | ||||
|     do | ||||
|       if [ -e "$homescript" ] || [ -L "$homescript" ] | ||||
|       then | ||||
|         mv $homescript $homescript.backup-$(date +%Y%m%dT%H%M%S) | ||||
|       fi | ||||
|       echo "--- Linking $SourcePath/$homescript to $HomePath/$homescript ..." | ||||
|       ln -s $SourcePath/$homescript ./ | ||||
|     else | ||||
|     done | ||||
|   elif [ "$CopyOrLinkScripts" == 'c' ] | ||||
|   then | ||||
|     for homescript in $homescriptlist | ||||
|     do | ||||
|       if [ -e "$homescript" ] | ||||
|       then | ||||
|         mv $homescript $homescript.backup-$(date +%Y%m%dT%H%M%S) | ||||
|       fi | ||||
|       echo "--- Copying $SourcePath/$homescript to $HomePath/$homescript ..." | ||||
|       cp -r $SourcePath/$homescript ./ | ||||
|     fi | ||||
|   done | ||||
|     done | ||||
|   else | ||||
|     echo '--- Home scripts not changed.' | ||||
|   fi | ||||
| 
 | ||||
|   echo | ||||
| 
 | ||||
|   if [ "$TheUser" != 'root' ] | ||||
|   if [ "$TheUser" != 'root' ] && [[ "$(uname)" != "Darwin" ]] # 仅允许 non-root 用户进行远程密钥登录 | ||||
|   then | ||||
| 
 | ||||
|     mkdir -p $HomePath/.ssh | ||||
|     chmod 700 $HomePath/.ssh | ||||
|     # 注意,由 root 为新用户创建的配置文件的 owner 是 root,而不是新用户,导致新用户无法读取该文件而密钥登录失败,因此要重设 owner。 | ||||
|     chown $TheUser:$TheUser $HomePath/.ssh | ||||
|     if [ "$2" ] | ||||
|     then | ||||
|       # 由 root 指定新用户而创建的配置文件的 owner 是 root,而不是新用户,导致新用户无法读取该文件而密钥登录失败,因此要重设 owner。 | ||||
|       chown $TheUser:$TheUser $HomePath/.ssh | ||||
|     fi | ||||
|     if [ -e '$HomePath/.ssh/authorized_keys' ] | ||||
|     then | ||||
|       mv $HomePath/.ssh/authorized_keys $HomePath/.ssh/authorized_keys.backup-$(date +%Y%m%d%H%M%S) | ||||
|       mv $HomePath/.ssh/authorized_keys $HomePath/.ssh/authorized_keys.backup-$(date +%Y%m%dT%H%M%S) | ||||
|     fi | ||||
| 
 | ||||
|     echo "=== Append or link or omit [$HomePath/.ssh/authorized_keys] to config ssh server? <a> for append, <l> for link, <<anything else>> for omit:" | ||||
| @ -101,6 +117,7 @@ then | ||||
|   fi | ||||
| 
 | ||||
|   popd | ||||
|    | ||||
| else | ||||
|   echo "!!! Not existing $HomePath, please try again." | ||||
| fi | ||||
|  | ||||
							
								
								
									
										126
									
								
								nixhome/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										126
									
								
								nixhome/.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,63 +1,97 @@ | ||||
| # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||||
| 
 | ||||
| node_modules/ | ||||
| ### 目录 ################################################################# | ||||
| 
 | ||||
| # wo-服务端 | ||||
| /_archive/* | ||||
| /_datastore/* | ||||
| /_filestore/* | ||||
| /_logstore/* | ||||
| /_webroot/* | ||||
| /_ssl/* | ||||
| 
 | ||||
| /test/unit/coverage/ | ||||
| /test/e2e/reports/ | ||||
| .svn/ | ||||
| .idea/ | ||||
| .sass-cache/ | ||||
| .deploy_git/ | ||||
| .gitattributes | ||||
| _desktop.ini | ||||
| .DS_Store | ||||
| .thumbnails | ||||
| Thumbs.db | ||||
| thumbs.db | ||||
| .umi | ||||
| .umi-production | ||||
| npm-debug.log* | ||||
| yarn-debug.log* | ||||
| yarn-error.log* | ||||
| selenium-debug.log | ||||
| package-lock.json | ||||
| *.iml | ||||
| *.njsproj | ||||
| *.ntvs* | ||||
| *.sln | ||||
| *.suo | ||||
| ._* | ||||
| .$* | ||||
| ~$* | ||||
| 
 | ||||
| .bashrc_custom | ||||
| 
 | ||||
| # hexo | ||||
| db.json | ||||
| 
 | ||||
| # 客户端 uniapp 项目 | ||||
| # uniapp 项目 | ||||
| /unpackage/* | ||||
| !/unpackage/res/ | ||||
| 
 | ||||
| /_archive/* | ||||
| /_datastore/* | ||||
| /_logstore/* | ||||
| /_filestore/* | ||||
| /_webroot/* | ||||
| # vue-cli 项目 | ||||
| /dist/ | ||||
| 
 | ||||
| # hexo | ||||
| /public/ | ||||
| 
 | ||||
| .svn/ | ||||
| .deploy_git/ | ||||
| .idea/ | ||||
| .sass-cache/ | ||||
| 
 | ||||
| node_modules/ | ||||
| 
 | ||||
| 
 | ||||
| ### 文件 ################################################################### | ||||
| 
 | ||||
| # seafile 临时文件 | ||||
| ._* | ||||
| 
 | ||||
| .$* | ||||
| 
 | ||||
| # office 暂存文件 | ||||
| ~$* | ||||
| 
 | ||||
| *.apk | ||||
| *.min.js | ||||
| *.min.css | ||||
| *.min.html | ||||
| /pages4loader.json5 | ||||
| envar-web-custom.js | ||||
| envar-deploy-secret.js | ||||
| *.iml | ||||
| *.njsproj | ||||
| *.ntvs* | ||||
| *.sw* | ||||
| *.sln | ||||
| *.suo | ||||
| 
 | ||||
| # hexo 项目 | ||||
| public/ | ||||
| .bashrc_custom | ||||
| 
 | ||||
| # 服务端(server or uniapp-uniCloud)项目 | ||||
| envar-base-custom.js | ||||
| envar-base-dynamic.js | ||||
| envar-base-secret.js | ||||
| # 苹果系统临时文件 | ||||
| .DS_Store | ||||
| 
 | ||||
| .gitattributes | ||||
| 
 | ||||
| # 来自 vue-cli 创建项目的 .gitignore | ||||
| .project | ||||
| 
 | ||||
| # 安卓缓存文件夹 | ||||
| .thumbnails | ||||
| 
 | ||||
| .umi | ||||
| .umi-production | ||||
| 
 | ||||
| # local env files | ||||
| .env.local | ||||
| .env.*.local | ||||
| 
 | ||||
| _desktop.ini | ||||
| 
 | ||||
| # hexo | ||||
| /db.json | ||||
| 
 | ||||
| # wo-客户端环境配置,wo-服务端环境配置(server or uniapp-uniCloud) | ||||
| envar-*.gitignore.js | ||||
| 
 | ||||
| npm-debug.log* | ||||
| 
 | ||||
| yarn-debug.log* | ||||
| yarn-error.log* | ||||
| yarn.lock | ||||
| 
 | ||||
| package-lock.json | ||||
| pages4loader.json5 | ||||
| 
 | ||||
| selenium-debug.log | ||||
| 
 | ||||
| Thumbs.db | ||||
| thumbs.db | ||||
| 
 | ||||
| !.gitkeep | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user