This commit is contained in:
Luk 2026-01-21 10:56:23 +08:00
parent 032fed7913
commit 25632ab024
3 changed files with 9 additions and 17 deletions

View File

@ -10,7 +10,6 @@ fi
if [ "$(uname)" = "Linux" ] if [ "$(uname)" = "Linux" ]
then then
# 用 dpkg --print-architecture 更直接
ARCH=`dpkg --print-architecture` ARCH=`dpkg --print-architecture`
else else
if [ "$(uname -m)" = "aarch64" ] || [ "$(uname -m)" = "arm64" ] # on MacBook Air M2, $(uname -m) returns 'arm64' if [ "$(uname -m)" = "aarch64" ] || [ "$(uname -m)" = "arm64" ] # on MacBook Air M2, $(uname -m) returns 'arm64'
@ -27,7 +26,7 @@ fi
OS=`uname | tr 'A-Z' 'a-z'` OS=`uname | tr 'A-Z' 'a-z'`
echo "::*** Install geth[b] for 二进制, [s] for 源代码,[anything else or leave blank] for no change" echo "::*** Install geth[b] 二进制, [s] 源代码,[anything else] for no change"
read -p "***:: " BINARY_OR_SOURCE read -p "***:: " BINARY_OR_SOURCE
if [ "$BINARY_OR_SOURCE" == 'b' ] if [ "$BINARY_OR_SOURCE" == 'b' ]
then then

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
echo "---------------------------------------------" echo "---------------------------------------------"
echo "User Name (leave blank for no change)" echo "User Name (leave blank for no change as $(git config --get user.name)"
read -p "***:: " UserName read -p "***:: " UserName
if [ $UserName ] if [ $UserName ]
then then
@ -10,7 +10,7 @@ then
fi fi
echo "---------------------------------------------" echo "---------------------------------------------"
echo "User Email (leave blank for no change)" echo "User Email (leave blank for no change as $(git config --get user.email))"
read -p "***:: " UserEmail read -p "***:: " UserEmail
if [ $UserEmail ] if [ $UserEmail ]
then then
@ -20,7 +20,7 @@ fi
echo "---------------------------------------------" echo "---------------------------------------------"
echo "如果 git 远程服务器的 ssl 证书过期,或者使用了自颁发的证书,连接时会出现验证错误 Cannot verify local issuer" echo "如果 git 远程服务器的 ssl 证书过期,或者使用了自颁发的证书,连接时会出现验证错误 Cannot verify local issuer"
echo "Verify ssl? (true or false, blank for no change)" echo "Verify ssl? (true or false, blank for no change as $(git config --get http.sslVerify))"
read -p "***:: " HttpSslVerify read -p "***:: " HttpSslVerify
if [ $HttpSslVerify ] if [ $HttpSslVerify ]
then then
@ -29,7 +29,7 @@ then
fi fi
echo "---------------------------------------------" echo "---------------------------------------------"
echo "Store credential in cache or store? (leave blank for no change)" echo "Store credential in cache or store? (leave blank for no change as $(git config --get credential.helper))"
read -p "***:: " CredentialHelper read -p "***:: " CredentialHelper
if [ $CredentialHelper ] if [ $CredentialHelper ]
then then
@ -38,7 +38,7 @@ then
fi fi
echo "---------------------------------------------" echo "---------------------------------------------"
echo "Store pull rebase to true or false? (leave blank for no change)" echo "Store pull rebase to true or false? (leave blank for no change as $(git config --get pull.rebase))"
read -p "***:: " PullRebase read -p "***:: " PullRebase
if [ $PullRebase ] if [ $PullRebase ]
then then
@ -47,8 +47,7 @@ then
fi fi
echo "---------------------------------------------" echo "---------------------------------------------"
echo "Current global gitignore file = $(git config --get core.excludesfile)" echo "Set [path to global gitignore file] (leave blank for no change as $(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
@ -59,7 +58,7 @@ else
fi fi
echo "---------------------------------------------" echo "---------------------------------------------"
echo "Set default branch since git 2.28 to master or main? (leave blank for no change)" echo "Set default branch since git 2.28 to master or main? (leave blank for no change as $(git config --get init.defaultbranch))"
read -p "***:: " DefaultBranch read -p "***:: " DefaultBranch
if [ $DefaultBranch ] if [ $DefaultBranch ]
then then
@ -68,7 +67,7 @@ then
fi fi
echo "---------------------------------------------" echo "---------------------------------------------"
echo "Set postBuffer size? Suggesting 157286400 (leave blank for no change)" echo "Set postBuffer size? Suggesting 157286400 (leave blank for no change as $(git config --get http.postBuffer))"
read -p "***:: " PostBufferSize read -p "***:: " PostBufferSize
if [ $PostBufferSize ] if [ $PostBufferSize ]
then then

View File

@ -1,6 +0,0 @@
#!/bin/bash
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
if [ -f .gitignore.local.txt ]; then cat .gitignore.local.txt >> .gitignore; fi;
echo