From 97b754bbb3c8116820d0c3456a9928b5db5d7963 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Fri, 24 Apr 2020 15:57:51 +0200 Subject: [PATCH] Fix pwgen install --- .gitattributes | 39 +++++++++++++++++++++++++++++++++++++++ mybashrc | 7 +++---- 2 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b8caf52 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,39 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Documents +*.md text eol=lf +*.tex text diff=tex +*.adoc text +*.textile text +*.mustache text eol=lf +*.csv text +*.tab text +*.tsv text +*.txt text +*.sql text + +# Scripts +*.bash text eol=lf +*.fish text eol=lf +*.sh text eol=lf + +# Source files +# ============ +*.pxd text diff=python +*.py text diff=python +*.py3 text diff=python +*.pyc text diff=python +*.pyd text diff=python +*.pyo text diff=python +*.pyw text diff=python +*.pyx text diff=python +*.pyz text diff=python + + +# +# Exclude files from exporting +# + +.gitattributes export-ignore +.gitignore export-ignore \ No newline at end of file diff --git a/mybashrc b/mybashrc index 7a1f529..4d50c14 100644 --- a/mybashrc +++ b/mybashrc @@ -8,7 +8,7 @@ else fi if [ "$(id -u)" != "0" ]; then - IS_SUDOERS=$(groups | grep sudo) + IS_SUDOERS=$(groups | grep -q sudo) if [ -n "$(command -v sudo)" ] && [ -n "$IS_SUDOERS" ]; then NEED_SUDO="$(command -v sudo)" else @@ -37,7 +37,7 @@ _run() { } apt_install() { - DEBIAN_FRONTEND=noninteractive apt-get install --option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold "$@" --assume-yes /dev/null 2>&1 + DEBIAN_FRONTEND=noninteractive apt-get install --option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold "$@" --assume-yes >/dev/null 2>&1 } transfer_vtbox_net() { @@ -498,7 +498,7 @@ _FTP_ADD() { echo "Usage : ftpadd " else if ! command_exists pwgen; then - $NEED_SUDO apt-get install pwgen -y > /dev/null 2>&1 + $NEED_SUDO apt-get install pwgen -y >/dev/null 2>&1 fi if [ -d /var/www/"$2"/htdocs ]; then ftpaccountpass=$(_PWGEN) @@ -699,7 +699,6 @@ _DELETE_WO_SITES() { done } - _STABILISE_VIDEO() { for i in "$PWD"/*; do