u
This commit is contained in:
@@ -9,7 +9,7 @@ const { execFileSync } = require('child_process')
|
|||||||
let ip
|
let ip
|
||||||
try {
|
try {
|
||||||
// 使用 curl 同步请求获取 IP
|
// 使用 curl 同步请求获取 IP
|
||||||
ip = execFileSync('curl', ['-s', 'https://api.ipify.org'], { encoding: 'utf8' }).trim()
|
ip = execFileSync('curl', ['-s', 'https://ifconfig.me'], { encoding: 'utf8' }).trim()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// 如果 curl 失败,降级为固定开发环境
|
// 如果 curl 失败,降级为固定开发环境
|
||||||
ip = '0.0.0.0'
|
ip = '0.0.0.0'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const path = require('path')
|
|||||||
console.log('\n::*** Merge remote and local gitignore files to .gitignore')
|
console.log('\n::*** Merge remote and local gitignore files to .gitignore')
|
||||||
|
|
||||||
// 下载远程 .gitignore_global 内容,不保存中间文件
|
// 下载远程 .gitignore_global 内容,不保存中间文件
|
||||||
const remoteUrl = 'https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global'
|
const remoteUrl = 'https://git.tic.cc/open/sysconfig/raw/branch/main/nixhome/.gitignore_global'
|
||||||
console.log('::--- fetching remote file:', remoteUrl)
|
console.log('::--- fetching remote file:', remoteUrl)
|
||||||
https
|
https
|
||||||
.get(remoteUrl, (res) => {
|
.get(remoteUrl, (res) => {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo ::*** Merge remote [.gitignore_global] and local [.gitignore.local.txt] to [.gitignore]
|
echo ::*** Merge remote [.gitignore_global] and local [.gitignore.local.txt] to [.gitignore]
|
||||||
curl -sSL https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global > .gitignore
|
curl -sSL https://git.tic.cc/open/sysconfig/raw/branch/main/nixhome/.gitignore_global > .gitignore
|
||||||
if [ -f .gitignore.local.txt ]; then cat .gitignore.local.txt >> .gitignore; fi;
|
if [ -f .gitignore.local.txt ]; then cat .gitignore.local.txt >> .gitignore; fi;
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# usage in package.json:
|
# usage in package.json:
|
||||||
# "to_merge_gitignore.sh": "curl -sSL https://git.tic.cc/npm/sysconfig/raw/branch/main/gitignore_merge.sh | bash",
|
# "to_merge_gitignore.sh": "curl -sSL https://git.tic.cc/open/sysconfig/raw/branch/main/gitignore_merge.sh | bash",
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"main": "app_versioning.js",
|
"main": "app_versioning.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.tic.cc/npm/wo_scripts"
|
"url": "https://git.tic.cc/open/wo_scripts"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|||||||
84
seafile-ignore.txt
Normal file
84
seafile-ignore.txt
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
# https://help.seafile.com/syncing_client/excluding_files/
|
||||||
|
# 注释。通配符:* 匹配0到若干个字符,包括代表目录的/。? 匹配1个字符,包括/。
|
||||||
|
# seafile-ignore.txt 只能控制在客户端需要忽略哪些文件。你依然可以在 seahub 的 web 界面创建这些被客户端忽略的文件。
|
||||||
|
# 在这种情况下,
|
||||||
|
# 这些文件会被同步到客户端,但是用户在客户端对这些文件的后续修改会被忽略,不会被同步回服务器。
|
||||||
|
# 文件在服务器端的后续更改会被同步到客户端,如果客户端也同时修改了这些文件,系统会生成冲突文件。
|
||||||
|
# seafile-ignore.txt 只能忽略还没有被同步的文件。对于已经被同步的文件,如果后来把它添加到 seafile-ignore.txt 中,系统只会忽略后续更改,已经上传的版本不会受影响。
|
||||||
|
|
||||||
|
### seafile-ignore.global.txt ###
|
||||||
|
|
||||||
|
# 自定义的后缀名,凡有 sfignore 后缀的都不进行同步
|
||||||
|
*.sfignore
|
||||||
|
*.sfignore/
|
||||||
|
*.sfignore.*
|
||||||
|
*.sfignore.*/
|
||||||
|
*.sfomit
|
||||||
|
*.sfomit.*
|
||||||
|
*.sfomit/
|
||||||
|
*.sfomit.*/
|
||||||
|
*.nosf
|
||||||
|
*.nosf.*
|
||||||
|
*.nosf/
|
||||||
|
*.nosf.*/
|
||||||
|
|
||||||
|
## everything 'git pull or fetch' will update `.git/FETCH_HEAD`, even if the content doesn't change. To avoid too many useless updates of this file in Seafile history:
|
||||||
|
FETCH_HEAD
|
||||||
|
*/FETCH_HEAD
|
||||||
|
|
||||||
|
.Trash/
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
*/.DS_Store
|
||||||
|
|
||||||
|
.thumbnails
|
||||||
|
*/.thumbnails
|
||||||
|
|
||||||
|
Thumbs.db
|
||||||
|
*/Thumbs.db
|
||||||
|
thumbs.db
|
||||||
|
*/thumbs.db
|
||||||
|
|
||||||
|
_desktop.ini
|
||||||
|
*/_desktop.ini
|
||||||
|
|
||||||
|
._*
|
||||||
|
*/._*
|
||||||
|
|
||||||
|
.$*
|
||||||
|
*/.$*
|
||||||
|
|
||||||
|
~$*
|
||||||
|
*/~$*
|
||||||
|
|
||||||
|
node_modules/
|
||||||
|
*/node_modules/
|
||||||
|
package-lock.json
|
||||||
|
*/package-lock.json
|
||||||
|
|
||||||
|
pages4loader.json5
|
||||||
|
*/pages4loader.json5
|
||||||
|
|
||||||
|
.deploy_git/
|
||||||
|
*/.deploy_git/
|
||||||
|
|
||||||
|
# next.js 项目
|
||||||
|
.next/
|
||||||
|
*/.next/
|
||||||
|
|
||||||
|
# HBuilder 目录
|
||||||
|
unpackage/
|
||||||
|
*/unpackage/
|
||||||
|
|
||||||
|
Icon
|
||||||
|
OneDrive/Icon
|
||||||
|
|
||||||
|
# wrangler project
|
||||||
|
|
||||||
|
.dev.vars*
|
||||||
|
*/.dev.vars*
|
||||||
|
.wrangler/
|
||||||
|
*/.wrangler/
|
||||||
|
|
||||||
|
### seafile-ignore.local.txt ###
|
||||||
|
|
||||||
Reference in New Issue
Block a user