From 91d5dd94a920037fe8380414bd8182aadbfe8c73 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 8 Dec 2016 22:02:15 +0000 Subject: [PATCH] bussybox bug, prepare to move from owncloud to dropbox --- README.md | 6 ++++-- etc/dbq.php | 2 ++ etc/profile | 1 + etc/profile.d/docker.sh | 1 + etc/profile.d/functions | 3 ++- etc/profile.d/git.sh | 1 + etc/profile.d/nb.sh | 8 ++++---- www/dbq/docker-compose.yaml | 3 ++- 8 files changed, 17 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index bfb7592a..54d3fc28 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -nb +NodeBoot ============= ## Synopsis -Main library +NodeBoot main library + +Copyright (c) 2015 - Nicolas Boisselier diff --git a/etc/dbq.php b/etc/dbq.php index 2c5f338e..181e91ac 100644 --- a/etc/dbq.php +++ b/etc/dbq.php @@ -11,6 +11,8 @@ unset($DIR_SQLITE); foreach ([ '/home/nico/ownCloud', '/Users/nico/ownCloud', + '/home/nico/Dropbox', + '/Users/nico/Dropbox', ] as $DIR_SQLITE) { if (is_readable($DIR_SQLITE)) { break; diff --git a/etc/profile b/etc/profile index 0aaf6d61..c9281033 100755 --- a/etc/profile +++ b/etc/profile @@ -77,6 +77,7 @@ else ${NB_ROOT}/etc/profile.d/aliases \ $(nb_repo "etc/profile" "etc/profile.d/*.sh" | grep -vFx "${NB_ROOT}/etc/profile") \ ;do +#unset i tmp NB_CURRENT_DIR NB_DEBUG NB_LOOP; return [ -n "$NB_DEBUG" ] && $NB_DEBUG "OK: . $i" [ -r "$i" -a -f "$i" ] && . "$i" done diff --git a/etc/profile.d/docker.sh b/etc/profile.d/docker.sh index 509449e5..b4040c26 100644 --- a/etc/profile.d/docker.sh +++ b/etc/profile.d/docker.sh @@ -5,6 +5,7 @@ which docker > /dev/null || return 0 [ -z "$DOCKER_MACHINE_NAME" ] && DOCKER_MACHINE_NAME="docker" [ -d ~/ownCloud/Docker ] && export DOCKER_HOME=~/ownCloud/Docker +[ -d ~/ownCloud/Docker ] && export DOCKER_HOME=~/Dropbox/Docker [ -z "$DOCKER_HUB" ] && DOCKER_HUB="" # Docker env only if `is_prompt` !!! diff --git a/etc/profile.d/functions b/etc/profile.d/functions index 43dbcbd8..0b2245be 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -31,8 +31,9 @@ else \ /home/*/code/*/.nb-install \ /Users/*/code/*/.nb-install \ - 2>/dev/null | xargs -n1 dirname \ + 2>/dev/null \ ); do + dir=$(dirname "$dir") realpath "$dir" done ) diff --git a/etc/profile.d/git.sh b/etc/profile.d/git.sh index c6883365..de74b713 100644 --- a/etc/profile.d/git.sh +++ b/etc/profile.d/git.sh @@ -163,3 +163,4 @@ git_conn_check() { return 0 } + diff --git a/etc/profile.d/nb.sh b/etc/profile.d/nb.sh index e612d2d7..6bbc64f0 100644 --- a/etc/profile.d/nb.sh +++ b/etc/profile.d/nb.sh @@ -16,6 +16,10 @@ nb_repos_commit_push() { cd "$pwd" } +nb_auth() { + curl -ku nico https://nico.nbdom.net/private/auth/ +} + nb_repos_status() { shell_help "List repos git status" "$@" && return local status @@ -32,10 +36,6 @@ nb_repos_status() { cd "$pwd" } -nb_auth() { - curl -ku nico https://nico.nbdom.net/private/auth/ -} - nb_mails() { printf '| 1-$ cat\nx\n' | mail | perl -MDate::Manip -MEncode -ne ' BEGIN { diff --git a/www/dbq/docker-compose.yaml b/www/dbq/docker-compose.yaml index f030ce07..d659add6 100644 --- a/www/dbq/docker-compose.yaml +++ b/www/dbq/docker-compose.yaml @@ -11,7 +11,8 @@ services: - ./../..:$NB_ROOT - /etc/profile.d - $HOME/.dbq:/home/www-data/.dbq - - $HOME/ownCloud/var/lib/sqlite:/var/lib/sqlite + - $HOME/$DOCKER_HOME/var/lib/sqlite:/var/lib/sqlite + #- $HOME/ownCloud/var/lib/sqlite:/var/lib/sqlite entrypoint: sh -c "echo . $NB_ROOT/etc/profile > /etc/profile.d/nb.sh && /usr/local/sbin/php-fpm" #entrypoint: "/usr/local/sbin/php-fpm" -- 2.47.3