u
This commit is contained in:
parent
ce814d7706
commit
032fed7913
@ -6,5 +6,6 @@ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo
|
|||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install caddy
|
sudo apt install caddy
|
||||||
|
|
||||||
|
echo
|
||||||
echo Certificates will be saved automatically in ~/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/
|
echo Certificates will be saved automatically in ~/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/
|
||||||
echo Config file of caddy started by systemctl : /etc/caddy/Caddyfile
|
echo Config file of caddy started by systemctl : /etc/caddy/Caddyfile
|
||||||
|
|||||||
@ -47,7 +47,8 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "---------------------------------------------"
|
echo "---------------------------------------------"
|
||||||
echo "Path to global gitignore file? (For example ~/.gitignore.global.txt, leave blank for no change)"
|
echo "Current global gitignore file = $(git config --get core.excludesfile)"
|
||||||
|
echo "Set [path to global gitignore file]? (leave blank for no change)"
|
||||||
read -p "***:: " ExcludesFile
|
read -p "***:: " ExcludesFile
|
||||||
if [ $ExcludesFile ]
|
if [ $ExcludesFile ]
|
||||||
then
|
then
|
||||||
@ -65,3 +66,14 @@ then
|
|||||||
echo "git config --global init.defaultbranch $DefaultBranch"
|
echo "git config --global init.defaultbranch $DefaultBranch"
|
||||||
git config --global init.defaultbranch $DefaultBranch
|
git config --global init.defaultbranch $DefaultBranch
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "---------------------------------------------"
|
||||||
|
echo "Set postBuffer size? Suggesting 157286400 (leave blank for no change)"
|
||||||
|
read -p "***:: " PostBufferSize
|
||||||
|
if [ $PostBufferSize ]
|
||||||
|
then
|
||||||
|
echo "git config --global http.postBuffer $PostBufferSize"
|
||||||
|
git config --global http.postBuffer $PostBufferSize
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -23,13 +23,13 @@ if not exist "%ROOTPATH%" (
|
|||||||
echo √√√ ROOTPATH = [[%ROOTPATH%]]
|
echo √√√ ROOTPATH = [[%ROOTPATH%]]
|
||||||
)
|
)
|
||||||
|
|
||||||
echo ::*** Enter [path to .gitignore.global.txt] or [leave blank] for default [[https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore.global.txt]]
|
echo ::*** Enter [path to .gitignore_global] or [leave blank] for default [[https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global]]
|
||||||
set /p IGNOREPATH=">>> "
|
set /p IGNOREPATH=">>> "
|
||||||
echo;
|
echo;
|
||||||
if "" == "%IGNOREPATH%" (
|
if "" == "%IGNOREPATH%" (
|
||||||
set IGNOREPATH=https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore.global.txt
|
set IGNOREPATH=https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global
|
||||||
) else (
|
) else (
|
||||||
for %P in (%IGNOREPATH%) do set "IGNOREPATH=%~dpnxP/.gitignore.global.txt"
|
for %P in (%IGNOREPATH%) do set "IGNOREPATH=%~dpnxP/.gitignore_global"
|
||||||
if not exist "%IGNOREPATH%" (
|
if not exist "%IGNOREPATH%" (
|
||||||
echo ××× [[%IGNOREPATH%]] not exist! Exit now. ***
|
echo ××× [[%IGNOREPATH%]] not exist! Exit now. ***
|
||||||
@ GOTO END
|
@ GOTO END
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Search in [ROOTPATH], merge [IGNOREPATH/.gitignore.global.txt] and [ROOTPATH/*/.gitignore.local.txt] files to [seafile-ignore.txt]"
|
echo "Search in [ROOTPATH], merge [IGNOREPATH/.gitignore_global] and [ROOTPATH/*/.gitignore.local.txt] files to [seafile-ignore.txt]"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ -d "$1" ]
|
if [ -d "$1" ]
|
||||||
@ -26,13 +26,13 @@ else
|
|||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "::*** Enter [path to .gitignore.global.txt] or [leave blank] for default [[https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore.global.txt]]"
|
echo "::*** Enter [path to .gitignore_global] or [leave blank] for default [[https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global]]"
|
||||||
read -p "***:: " IGNOREPATH
|
read -p "***:: " IGNOREPATH
|
||||||
if [ "$IGNOREPATH" ]
|
if [ "$IGNOREPATH" ]
|
||||||
then
|
then
|
||||||
if [ -d "$IGNOREPATH" ]
|
if [ -d "$IGNOREPATH" ]
|
||||||
then
|
then
|
||||||
IGNOREPATH=$(realpath $IGNOREPATH)/.gitignore.global.txt
|
IGNOREPATH=$(realpath $IGNOREPATH)/.gitignore_global
|
||||||
fi
|
fi
|
||||||
if [ ! -f "$IGNOREPATH" ]
|
if [ ! -f "$IGNOREPATH" ]
|
||||||
then
|
then
|
||||||
@ -42,7 +42,7 @@ then
|
|||||||
echo "√√√ IGNOREPATH = [[$IGNOREPATH]]"
|
echo "√√√ IGNOREPATH = [[$IGNOREPATH]]"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
IGNOREPATH=https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore.global.txt
|
IGNOREPATH=https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo ::*** Merge remote [.gitignore.global.txt] 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.txt > .gitignore
|
curl -sSL https://git.tic.cc/npm/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
|
||||||
|
|||||||
@ -6,7 +6,7 @@ elif [ -d "$(pwd)/nixhome" ]; then
|
|||||||
NIXHOME=$(pwd)/nixhome
|
NIXHOME=$(pwd)/nixhome
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "::*** Enter [root path] or [leave blank] for default to [[$(pwd)]]"
|
echo "::*** Enter [root path of nixhome] or [leave blank] for current [[$(pwd)]]"
|
||||||
read -p "***:: " NIXHOME
|
read -p "***:: " NIXHOME
|
||||||
if [ -z "$NIXHOME" ]; then
|
if [ -z "$NIXHOME" ]; then
|
||||||
NIXHOME=$(pwd)
|
NIXHOME=$(pwd)
|
||||||
@ -38,7 +38,7 @@ if [ -d "$HomePath" ]; then
|
|||||||
|
|
||||||
pushd "$HomePath"
|
pushd "$HomePath"
|
||||||
|
|
||||||
homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore.global.txt"
|
homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore_global"
|
||||||
echo
|
echo
|
||||||
echo "::*** Copy or link scripts? [l] to link, [c] to copy, [g] to git import, [anything else] to omit:"
|
echo "::*** Copy or link scripts? [l] to link, [c] to copy, [g] to git import, [anything else] to omit:"
|
||||||
read -p "***:: " CopyOrLinkScripts
|
read -p "***:: " CopyOrLinkScripts
|
||||||
|
|||||||
@ -19,3 +19,7 @@ unset USERNAME
|
|||||||
################################################################################
|
################################################################################
|
||||||
# End Of File: "~/.bash_profile"
|
# End Of File: "~/.bash_profile"
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
# Added by OrbStack: command-line tools and integration
|
||||||
|
# This won't be added again if you remove it.
|
||||||
|
source ~/.orbstack/shell/init.bash 2>/dev/null || :
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
# https://github.com/SlideWave/gitignore-include?tab=readme-ov-file#examples
|
# https://github.com/SlideWave/gitignore-include?tab=readme-ov-file#examples
|
||||||
# https://gitignore.io
|
# https://gitignore.io
|
||||||
|
|
||||||
### .gitignore.global.txt ###
|
### .gitignore_global ###
|
||||||
|
|
||||||
# Self defined pattern to ignore
|
# Self defined pattern to ignore
|
||||||
?*.gitignore
|
?*.gitignore
|
||||||
4
proxy.sh
4
proxy.sh
@ -11,10 +11,10 @@ fi
|
|||||||
|
|
||||||
# to reset port to empty, otherwise the second run of this script will not ask for port.
|
# to reset port to empty, otherwise the second run of this script will not ask for port.
|
||||||
PORT=
|
PORT=
|
||||||
PORTDEFAULT=20170
|
PORTDEFAULT=17890
|
||||||
# function proxy() {
|
# function proxy() {
|
||||||
if [ "$proxySwitch" == "s" ] || [ "$proxySwitch" == "1" ]; then
|
if [ "$proxySwitch" == "s" ] || [ "$proxySwitch" == "1" ]; then
|
||||||
echo "::*** Proxy server running on [port number] or [leave blank] for default $PORTDEFAULT (20170 for v2ray2, or 7897 for clash verge)"
|
echo "::*** Proxy server running on [port number] or [leave blank] for default $PORTDEFAULT (20170 for v2ray2, 17890 for 零点云, or 7897 for clash verge)"
|
||||||
while [ ! "$PORT" ]
|
while [ ! "$PORT" ]
|
||||||
do
|
do
|
||||||
read -p "***:: " PORT
|
read -p "***:: " PORT
|
||||||
|
|||||||
3
ssh.sh
3
ssh.sh
@ -10,10 +10,13 @@ fi
|
|||||||
|
|
||||||
# Path to the settings.json file
|
# Path to the settings.json file
|
||||||
SETTINGS_FILE="$HOME/Library/Application Support/Code/User/settings.json"
|
SETTINGS_FILE="$HOME/Library/Application Support/Code/User/settings.json"
|
||||||
|
if [[ ! -f "$SETTINGS_FILE" ]]; then
|
||||||
|
SETTINGS_FILE="$HOME/product_产品/.vscode/settings.json"
|
||||||
if [[ ! -f "$SETTINGS_FILE" ]]; then
|
if [[ ! -f "$SETTINGS_FILE" ]]; then
|
||||||
echo "settings.json file not found!"
|
echo "settings.json file not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# 自定义的列表,但是测试有问题,只有第一行被select添加了序号
|
# 自定义的列表,但是测试有问题,只有第一行被select添加了序号
|
||||||
# targets=$(jq -r '.["sshfs.configs"][] | "\(.name)"' "$SETTINGS_FILE")
|
# targets=$(jq -r '.["sshfs.configs"][] | "\(.name)"' "$SETTINGS_FILE")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user