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/cloud-user-vue
|
||||||
git clone https://git.faronear.org/tic/star-core-torm
|
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-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-blog-hexo
|
||||||
git clone https://git.faronear.org/tic/tic-www-vue
|
git clone https://git.faronear.org/tic/tic-www-vue
|
||||||
|
|
||||||
|
@ -48,38 +48,54 @@ fi
|
|||||||
|
|
||||||
if [ -d "$HomePath" ]
|
if [ -d "$HomePath" ]
|
||||||
then
|
then
|
||||||
|
|
||||||
pushd $HomePath
|
pushd $HomePath
|
||||||
|
|
||||||
homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore"
|
homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore"
|
||||||
echo
|
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
|
read -p ">>> " CopyOrLinkScripts
|
||||||
for homescript in $homescriptlist
|
if [ "$CopyOrLinkScripts" == 'l' ]
|
||||||
do
|
then
|
||||||
if [ -e "$homescript" ]
|
for homescript in $homescriptlist
|
||||||
then
|
do
|
||||||
mv $homescript $homescript.backup-$(date +%Y%m%d%H%M%S)
|
if [ -e "$homescript" ] || [ -L "$homescript" ]
|
||||||
fi
|
then
|
||||||
if [ "$CopyOrLinkScripts" = 'l' ]
|
mv $homescript $homescript.backup-$(date +%Y%m%dT%H%M%S)
|
||||||
then
|
fi
|
||||||
echo "--- Linking $SourcePath/$homescript to $HomePath/$homescript ..."
|
echo "--- Linking $SourcePath/$homescript to $HomePath/$homescript ..."
|
||||||
ln -s $SourcePath/$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 ..."
|
echo "--- Copying $SourcePath/$homescript to $HomePath/$homescript ..."
|
||||||
cp -r $SourcePath/$homescript ./
|
cp -r $SourcePath/$homescript ./
|
||||||
fi
|
done
|
||||||
done
|
else
|
||||||
|
echo '--- Home scripts not changed.'
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if [ "$TheUser" != 'root' ]
|
if [ "$TheUser" != 'root' ] && [[ "$(uname)" != "Darwin" ]] # 仅允许 non-root 用户进行远程密钥登录
|
||||||
then
|
then
|
||||||
|
|
||||||
mkdir -p $HomePath/.ssh
|
mkdir -p $HomePath/.ssh
|
||||||
chmod 700 $HomePath/.ssh
|
chmod 700 $HomePath/.ssh
|
||||||
# 注意,由 root 为新用户创建的配置文件的 owner 是 root,而不是新用户,导致新用户无法读取该文件而密钥登录失败,因此要重设 owner。
|
if [ "$2" ]
|
||||||
chown $TheUser:$TheUser $HomePath/.ssh
|
then
|
||||||
|
# 由 root 指定新用户而创建的配置文件的 owner 是 root,而不是新用户,导致新用户无法读取该文件而密钥登录失败,因此要重设 owner。
|
||||||
|
chown $TheUser:$TheUser $HomePath/.ssh
|
||||||
|
fi
|
||||||
if [ -e '$HomePath/.ssh/authorized_keys' ]
|
if [ -e '$HomePath/.ssh/authorized_keys' ]
|
||||||
then
|
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
|
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:"
|
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
|
fi
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "!!! Not existing $HomePath, please try again."
|
echo "!!! Not existing $HomePath, please try again."
|
||||||
fi
|
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.
|
# 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/unit/coverage/
|
||||||
/test/e2e/reports/
|
/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
|
# uniapp 项目
|
||||||
|
|
||||||
# hexo
|
|
||||||
db.json
|
|
||||||
|
|
||||||
# 客户端 uniapp 项目
|
|
||||||
/unpackage/*
|
/unpackage/*
|
||||||
!/unpackage/res/
|
!/unpackage/res/
|
||||||
|
|
||||||
/_archive/*
|
# vue-cli 项目
|
||||||
/_datastore/*
|
|
||||||
/_logstore/*
|
|
||||||
/_filestore/*
|
|
||||||
/_webroot/*
|
|
||||||
/dist/
|
/dist/
|
||||||
|
|
||||||
|
# hexo
|
||||||
|
/public/
|
||||||
|
|
||||||
|
.svn/
|
||||||
|
.deploy_git/
|
||||||
|
.idea/
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
|
||||||
|
### 文件 ###################################################################
|
||||||
|
|
||||||
|
# seafile 临时文件
|
||||||
|
._*
|
||||||
|
|
||||||
|
.$*
|
||||||
|
|
||||||
|
# office 暂存文件
|
||||||
|
~$*
|
||||||
|
|
||||||
*.apk
|
*.apk
|
||||||
*.min.js
|
*.min.js
|
||||||
*.min.css
|
*.min.css
|
||||||
*.min.html
|
*.min.html
|
||||||
/pages4loader.json5
|
*.iml
|
||||||
envar-web-custom.js
|
*.njsproj
|
||||||
envar-deploy-secret.js
|
*.ntvs*
|
||||||
|
*.sw*
|
||||||
|
*.sln
|
||||||
|
*.suo
|
||||||
|
|
||||||
# hexo 项目
|
.bashrc_custom
|
||||||
public/
|
|
||||||
|
|
||||||
# 服务端(server or uniapp-uniCloud)项目
|
# 苹果系统临时文件
|
||||||
envar-base-custom.js
|
.DS_Store
|
||||||
envar-base-dynamic.js
|
|
||||||
envar-base-secret.js
|
.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
|
!.gitkeep
|
||||||
|
Loading…
Reference in New Issue
Block a user