1
0
Fork 0

update wo

This commit is contained in:
VirtuBox 2019-10-28 17:44:14 +01:00
parent aae4ee3c37
commit 3132e5de09
Signed by: virtubox
GPG Key ID: 22EB296C97BAD476
1 changed files with 7 additions and 14 deletions

View File

@ -11,7 +11,7 @@ if [ "$(id -u)" != "0" ]; then
fi
command_exists() {
command -v "$@" > /dev/null 2>&1
command -v "$@" >/dev/null 2>&1
}
apt_install() {
@ -33,7 +33,7 @@ decompress_pigz() {
update_git_mybashrc() {
if [ -d "$HOME/.mybashrc/.git" ]; then
git -C "$HOME/.mybashrc" pull -q
$HOME/.mybashrc/setup.sh > /dev/null 2>&1
$HOME/.mybashrc/setup.sh >/dev/null 2>&1
fi
}
@ -386,7 +386,7 @@ _INSTALL_NANORC() {
git clone --depth 1 https://github.com/scopatz/nanorc.git /usr/share/nano-syntax-highlighting -q
fi
if ! grep -q "/usr/share/nano-syntax-highlighting" /etc/nanorc; then
echo "include /usr/share/nano-syntax-highlighting/*.nanorc" >> /etc/nanorc
echo "include /usr/share/nano-syntax-highlighting/*.nanorc" >>/etc/nanorc
fi
}
@ -533,9 +533,9 @@ _PWGEN() {
_FD() {
if [ -z "$(command -v fd)" ]; then
echo "downloading fd ..."
wget -qO https://github.com/sharkdp/fd/releases/download/v7.3.0/fd-musl_7.3.0_amd64.deb -O /tmp/fd.deb > /dev/null
wget -qO https://github.com/sharkdp/fd/releases/download/v7.3.0/fd-musl_7.3.0_amd64.deb -O /tmp/fd.deb >/dev/null
echo "installing fd ..."
dpkg -i /tmp/fd.deb && rm /tmp/db.deb > /dev/null
dpkg -i /tmp/fd.deb && rm /tmp/db.deb >/dev/null
fi
fd "$@"
}
@ -577,16 +577,9 @@ _WO_FULL_UPGRADE() {
[ ! -f "$HOME/.gitconfig" ] && {
sudo bash -c 'echo -e "[user]\n\tname = $USER\n\temail = root@wops.cc" > $HOME/.gitconfig'
}
rm -f wo
wget -qO wo https://raw.githubusercontent.com/WordOps/WordOps/updating-configuration/install && sudo bash wo --travis
if [ -d "$HOME/WordOps" ]; then
git -C "$HOME/WordOps" stash
git -C "$HOME/WordOps" pull origin updating-configuration
else
git clone --depth=1 --branch=updating-configuration https://github.com/WordOps/WordOps.git "$HOME/WordOps"
fi
cd "$HOME/WordOps" || exit 1
sudo bash install --travis --force
}
# enable color support of ls and also add handy aliases