fix: some small bugs

This commit is contained in:
Klesh Wong 2021-11-10 21:00:57 +08:00
parent 6400fabbec
commit 20fc2e210a
3 changed files with 16 additions and 14 deletions

View File

@ -6,7 +6,7 @@ DIR=$(dirname "$(readlink -f "$0")")
log 'Setting up nnn' log 'Setting up nnn'
$NNN_CONFIG_DIR="$XDG_CONFIG_HOME/nnn/plugins" NNN_CONFIG_DIR="$XDG_CONFIG_HOME/nnn"
# setup package mirror for CHINA # setup package mirror for CHINA
case "$PM" in case "$PM" in
@ -19,13 +19,12 @@ case "$PM" in
rm -rf nnn.tar.gz rm -rf nnn.tar.gz
cd - cd -
mkdir -p "$NNN_CONFIG_DIR" mkdir -p "$NNN_CONFIG_DIR/plugins"
HTTPS_PROXY=$GITHUB_PROXY curl -Lo "$NNN_CONFIG_DIR/plugins/fzcd" https://github.com/jarun/nnn/raw/master/plugins/fzcd HTTPS_PROXY=$GITHUB_PROXY curl -Lo "$NNN_CONFIG_DIR/plugins/fzcd" https://github.com/jarun/nnn/raw/master/plugins/fzcd
HTTPS_PROXY=$GITHUB_PROXY curl -Lo "$NNN_CONFIG_DIR/plugins/preview-tui" https://github.com/jarun/nnn/raw/master/plugins/preview-tui HTTPS_PROXY=$GITHUB_PROXY curl -Lo "$NNN_CONFIG_DIR/plugins/preview-tui" https://github.com/jarun/nnn/raw/master/plugins/preview-tui
;; ;;
pacman) pacman)
sudo pacman -S --noconfirm --needed nnn sudo pacman -S --noconfirm --needed nnn
yay -S --noconfirm --needed dragon-drag-and-drop
cp -r /usr/share/nnn/plugins/. "$NNN_CONFIG_DIR" cp -r /usr/share/nnn/plugins/. "$NNN_CONFIG_DIR"
esac esac

View File

@ -6,6 +6,7 @@ DIR=$(dirname "$(readlink -f "$0")")
log "Setting up go" log "Setting up go"
# install go # install go
if ! has_cmd go; then
case "$PM" in case "$PM" in
pkg) pkg)
pkg install golang -y pkg install golang -y
@ -19,6 +20,7 @@ case "$PM" in
go go
;; ;;
esac esac
fi
if in_china; then if in_china; then
go env -w GO111MODULE=on go env -w GO111MODULE=on

View File

@ -42,15 +42,14 @@ EOF
# install browserpass-native # install browserpass-native
intorepo https://github.com/browserpass/browserpass-native.git "$DIR/repos/browserpass-native"
make configure
make
sudo make install
exitrepo
if [ -n "$WSL" ]; then if [ -n "$WSL" ]; then
echo "Please download browserpass-native for windows 64 and extract it to /usr/local/bin" echo "Please download browserpass-native for windows 64 and extract it to /usr/local/bin"
x-open https://github.com/browserpass/browserpass-native/releases/latest x-open https://github.com/browserpass/browserpass-native/releases/latest
else
intorepo https://github.com/browserpass/browserpass-native.git "$DIR/repos/browserpass-native"
make configure
make
sudo make install
exitrepo
fi fi
# enable browser-native for google-chrome # enable browser-native for google-chrome
@ -60,11 +59,13 @@ fi
# chrome extension: https://chrome.google.com/webstore/detail/browserpass/naepdomgkenhinolocfifgehidddafch # chrome extension: https://chrome.google.com/webstore/detail/browserpass/naepdomgkenhinolocfifgehidddafch
# enable browserpass for browsers # enable browserpass for browsers
cd /usr/lib/browserpass if [ -f /usr/lib/browserpass ]; then
has_cmd chromium && make hosts-chromium-user cd /usr/lib/browserpass
has_cmd firefox && make hosts-firefox-user has_cmd chromium && make hosts-chromium-user
has_cmd google-chrome && make hosts-chrome-user has_cmd firefox && make hosts-firefox-user
cd - has_cmd google-chrome && make hosts-chrome-user
cd -
fi
# android # android
# [OpenKeyChain - encryption/decryption](https://f-droid.org/packages/org.sufficientlysecure.keychain/) # [OpenKeyChain - encryption/decryption](https://f-droid.org/packages/org.sufficientlysecure.keychain/)