This commit is contained in:
陆柯 2023-09-12 13:49:28 +08:00
parent 6f6e75f12b
commit c96f229f93
7 changed files with 51 additions and 18 deletions

View File

@ -50,7 +50,7 @@ then
homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore"
echo
echo "=== Copy or link scripts? <l> to link, <c> to copy, <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
if [ "$CopyOrLinkScripts" == 'l' ]
then
@ -67,13 +67,23 @@ then
then
for homescript in $homescriptlist
do
if [ -e "$homescript" ]
if [ -e "$homescript" ] || [ -L "$homescript" ]
then
mv $homescript $homescript.backup-$(date +%Y%m%dT%H%M%S)
fi
echo "--- Copying $NIXHOME/$homescript to $HomePath/$homescript ..."
cp -r $NIXHOME/$homescript ./
done
elif [ "$CopyOrLinkScripts" == 'g' ]
then
for homescript in $homescriptlist
do
if [ -e "$homescript" ] || [ -L "$homescript" ]
then
mv $homescript $homescript.backup-$(date +%Y%m%dT%H%M%S)
fi
curl -sSLO https://git.faronear.org/npm/sysconfig/raw/branch/main/nixhome/$homescript
done
else
echo '--- Home scripts not changed.'
fi

View File

@ -1,2 +0,0 @@
curl -sSL https://git.faronear.org/npm/sysconfig/raw/branch/main/nixhome/.bashrc > ~/.bashrc
curl -sSL https://git.faronear.org/npm/sysconfig/raw/branch/main/nixhome/.emacs > ~/.emacs

View File

@ -1,3 +0,0 @@
#!/bin/bash
sudo -v ; curl https://rclone.org/install.sh | sudo bash

30
rclone-starter.sh Normal file
View File

@ -0,0 +1,30 @@
#!/bin/bash
echo "=== rclone <i> to install, <s> to sync, <w> to web gui"
read -p ">>> " ACTION_TYPE
if [ "$ACTION_TYPE" = 'i' ]
then
sudo -v ; curl https://rclone.org/install.sh | sudo bash
elif [ "$ACTION_TYPE" = 's' ]
then
echo "rclone sync from source:"
read -p ">>> " SOURCE_PATH
echo "rclone sync to target:"
read -p ">>> " TARGET_PATH
echo "rclone sync with max-age:"
read -p ">>> " MAX_AGE
echo
echo "*****************************"
echo "rclone sync $SOURCE_PATH $TARGET_PATH -P -L --create-empty-src-dirs --max-age=$MAX_AGE --exclude=._* --exclude=.DS_Store --exclude=node_modules"
echo "*****************************"
echo "Start cloning? <y> for yes, <anything else> for quit"
read -p ">>> " YES_OR_NOT
if [ "$YES_OR_NOT" = 'y' ]
then
rclone sync $SOURCE_PATH $TARGET_PATH -P -L --create-empty-src-dirs --max-age=$MAX_AGE --exclude=._* --exclude=.DS_Store --exclude={node_modules/,.deploy_git/,unpackage/}
fi
elif [ "ACTION_TYPE" = 'w' ]
then
rclone rcd --rc-web-gui
fi

View File

@ -1,3 +0,0 @@
#!/bin/bash
rclone rcd --rc-web-gui

View File

@ -47,14 +47,8 @@ pages4loader.json5
.deploy_git/
*/.deploy_git/
unpackage/dist/
*/unpackage/dist/
unpackage/release/
*/unpackage/release/
unpackage/cache/
*/unpackage/cache/
unpackage/
*/unpackage/
Icon
OneDrive/Icon

7
temp-detect.sh Normal file
View File

@ -0,0 +1,7 @@
sudo apt install lm-sensors hddtemp psensor -y
sudo sensors-detect
sudo sensors
sudo hddtemp /dev/sdb # run `fdisk -l` to get disk names