Skip to content

kenote/bash

Repository files navigation

Bash

_  _ ____ _  _ ____ ___ ____  
|_/  |___ |\ | |  |  |  |___  
| \_ |___ | \| |__|  |  |___  

Bash脚本工具 v.1.0

设置源

Github

curl -Lso- https://raw.githubusercontent.com/kenote/bash/main/base.sh | bash -s -- --mirror https://raw.githubusercontent.com/kenote/bash/main; \
if (echo $SHELL | grep -q "zsh");then source ~/.zshrc; else source ~/.bash_profile; fi

Gitee

curl -Lso- https://gitee.com/kenote/bash/raw/main/base.sh | bash -s -- --mirror https://gitee.com/kenote/bash/raw/main; \
if (echo $SHELL | grep -q "zsh");then source ~/.zshrc; else source ~/.bash_profile; fi

Install 安装

安装脚本

curl -Lso- $KENOTE_BASH_MIRROR/base.sh | bash -s -- --init

运行

~/kenote/start.sh

设置热键

curl -Lso- $KENOTE_BASH_MIRROR/base.sh | bash -s -- --hotkey "kn"; \
if (echo $SHELL | grep -q "zsh");then source ~/.zshrc; else source ~/.bash_profile; fi

自定义源

拉取 Github; 默认 /mnt/mirrors, 也可以通过 --install /home/mirrors 指定

curl -Lso- https://raw.githubusercontent.com/kenote/bash/main/kenote.sh | bash -s -- --install

Nginx 设置

location /kenote {
    alias /mnt/mirrors/kenote;
    index index.html index.htm;

    autoindex on;
    charset utf-8;

    types {
        text/plain  txt md sh conf repo json yml yaml tpl njk mjml php;
    }
}
location /packages {
    alias /mnt/mirrors/packages;
    index index.html index.htm;

    autoindex on;
    charset utf-8;

    types {
        text/plain  txt md sh conf repo json yml yaml tpl njk mjml php;
    }
}

添加计划任务

/mnt/mirrors/kenote.sh --cron

设定计划任务更新点

/mnt/mirrors/kenote.sh --cron "30 2 * * *"

手动更新

/mnt/mirrors/kenote.sh --update

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published