Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0aeb135215 | |||
| 34857bb7a3 |
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
ROOT="${ROOT:-$PWD}"
|
||||
DOCKER_IMAGE="${DOCKER_IMAGE:-sabayon/builder-amd64}"
|
||||
. /sbin/sabayondevkit-functions.sh
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
@@ -8,8 +10,6 @@ if [ $# -eq 0 ]
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "!! If you are not running the script as root, your user should be in the docker group to use it. (sudo gpasswd -a $USER docker) !!"
|
||||
fi
|
||||
check_docker_requirements
|
||||
|
||||
docker run --rm -v "$ROOT"/portage_artifacts:/usr/portage/packages -ti sabayon/builder-amd64 $@
|
||||
docker run --rm -v "$ROOT"/portage_artifacts:/usr/portage/packages -ti $DOCKER_IMAGE $@
|
||||
|
||||
+5
-4
@@ -1,15 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
. /sbin/sabayondevkit-functions.sh
|
||||
|
||||
ROOT="${ROOT:-$PWD}"
|
||||
entropysrv=$(mktemp)
|
||||
createrepo=$(mktemp)
|
||||
REPOSITORY_NAME="${REPOSITORY_NAME:-default}"
|
||||
REPOSITORY_DESCRIPTION="${REPOSITORY_DESCRIPTION:-My Sabayon repository}"
|
||||
DOCKER_IMAGE="${DOCKER_IMAGE:-sabayon/builder-amd64}"
|
||||
EDITOR=cat
|
||||
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "!! If you are not running the script as root, your user should be in the docker group to use it. (sudo gpasswd -a $USER docker) !!"
|
||||
fi
|
||||
check_docker_requirements
|
||||
|
||||
echo "Repository: $REPOSITORY_NAME"
|
||||
echo "Repository Description: $REPOSITORY_DESCRIPTION"
|
||||
@@ -72,6 +73,6 @@ docker run --rm --entrypoint /bin/bash -e REPOSITORY=$REPOSITORY_NAME -e EDITOR=
|
||||
-v $createrepo:/sabayon/bin/create_repo.sh \
|
||||
-v $entropysrv:/etc/entropy/server.conf \
|
||||
-v "$ROOT"/portage_artifacts:/usr/portage/packages \
|
||||
-ti sabayon/builder-amd64 /sabayon/bin/create_repo.sh || true
|
||||
-ti $DOCKER_IMAGE /sabayon/bin/create_repo.sh || true
|
||||
rm -rf $createrepo
|
||||
rm -rf $entropysrv
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
check_docker_requirements(){
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
groups | grep -q docker || echo "--> If you are not running the script as root, your user should be in the docker group to use it. (sudo gpasswd -a $USER docker)"
|
||||
fi
|
||||
ps aux | grep -q '[d]ocker' || echo "--> Be sure to have the docker daemon running (sudo systemctl start docker)"
|
||||
}
|
||||
|
||||
build() {
|
||||
local SEARCH=$1
|
||||
local EMERGE_DEFAULT_ARGS=${2:---accept-properties=-interactive --verbose --oneshot --nospinner --quiet-build=y --quiet-fail --fail-clean=y --complete-graph --buildpkg}
|
||||
|
||||
Reference in New Issue
Block a user