Semplificato il recupero delle informazioni di path

master
Guido Longoni 2020-01-08 17:00:58 +01:00
parent 34c074099b
commit f229137fc8
6 changed files with 55 additions and 71 deletions

View File

@ -1,9 +1,5 @@
#! /bin/bash -- #! /bin/bash --
[ ! -z "${GREZZO_1577141523}" ] && return; GREZZO_1577141523=0 [ ! -z "${GREZZO_1577141523}" ] && return; GREZZO_1577141523=0
unset CDPATH
DOVE="$(cd "$(dirname "$(readlink -f -- "${BASH_SOURCE[0]}")")" > /dev/null && pwd -P)"
. "$DOVE/../grezzo.sh"
function feat_addpacks_docker() { function feat_addpacks_docker() {
if ! feat_missing "apt-get"; then if ! feat_missing "apt-get"; then
@ -34,8 +30,6 @@ function feat_add_docker() {
} }
function pip_feat_add_docker-compose() { function pip_feat_add_docker-compose() {
. "$DOVE/pip.sh" . "$(this_script_path)/pip.sh"
pip_feat_add "docker-compose" pip_feat_add "docker-compose"
} }
unset DOVE

View File

@ -1,9 +1,5 @@
#! /bin/bash -- #! /bin/bash --
[ ! -z "${GREZZO_1577142009}" ] && return; GREZZO_1577142009=0 [ ! -z "${GREZZO_1577142009}" ] && return; GREZZO_1577142009=0
unset CDPATH
DOVE="$(cd "$(dirname "$(readlink -f -- "${BASH_SOURCE[0]}")")" > /dev/null && pwd -P)"
. "$DOVE/../grezzo.sh"
function feat_addpacks_npm_dev() { function feat_addpacks_npm_dev() {
if ! feat_missing "apt-get"; then if ! feat_missing "apt-get"; then
@ -31,5 +27,3 @@ function feat_add_npm() {
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n | bash -s latest curl -L https://raw.githubusercontent.com/tj/n/master/bin/n | bash -s latest
npm install -g n npm install -g n
} }
unset DOVE

View File

@ -1,9 +1,5 @@
#! /bin/bash -- #! /bin/bash --
[ ! -z "${GREZZO_1577142035}" ] && return; GREZZO_1577142035=0 [ ! -z "${GREZZO_1577142035}" ] && return; GREZZO_1577142035=0
unset CDPATH
DOVE="$(cd "$(dirname "$(readlink -f -- "${BASH_SOURCE[0]}")")" > /dev/null && pwd -P)"
. "$DOVE/../grezzo.sh"
function feat_addpacks_pip_dev() { function feat_addpacks_pip_dev() {
if ! feat_missing "apt-get"; then if ! feat_missing "apt-get"; then
@ -64,5 +60,3 @@ function pip_feat_needed() {
fi fi
fi fi
} }
unset DOVE

View File

@ -1,9 +1,7 @@
#! /bin/bash -- #! /bin/bash --
[ ! -z "${GREZZO_1577142078}" ] && return; GREZZO_1577142078=0 [ ! -z "${GREZZO_1577142078}" ] && return; GREZZO_1577142078=0
unset CDPATH
DOVE="$(cd "$(dirname "$(readlink -f -- "${BASH_SOURCE[0]}")")" > /dev/null && pwd -P)"
. "$DOVE/pip.sh" . "$(this_script_path)/pip.sh"
function feat_add_poetry() { function feat_add_poetry() {
feat_needed "pip" feat_needed "pip"

View File

@ -1,5 +1,10 @@
#! /bin/bash -- #! /bin/bash --
[ ! -z "${GREZZO_1577142105}" ] && return; GREZZO_1577142105=0 [ ! -z "${GREZZO_MAIN}" ] && return; GREZZO_MAIN=0
function this_script_path() {
unset CDPATH
echo "$(cd "$(dirname "$(readlink -f -- "${BASH_SOURCE[1]}")")" > /dev/null && pwd -P)"
}
function feat_missing() { function feat_missing() {
! command -v "$1" 2>&1 >/dev/null ! command -v "$1" 2>&1 >/dev/null

View File

@ -1,8 +1,7 @@
#! /bin/bash -- #! /bin/bash --
unset CDPATH
DOVE="$(cd "$(dirname "$(readlink -f -- "${BASH_SOURCE[0]}")")" > /dev/null && pwd -P)"
. "$DOVE/featlib/poetry.sh" . "grezzo.sh"
. "featlib/poetry.sh"
mkdir -p test mkdir -p test
cd test cd test