Skip to content

Commit

Permalink
pkg: enable to use sudo with docker/podman
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
  • Loading branch information
outscale-mgo authored and jerome-jutteau committed Nov 4, 2021
1 parent 7a4e79b commit 1a78189
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ osc-cli-x86_64.zip: osc-cli
zip -r osc-cli-x86_64.zip osc-cli

osc-cli:
docker run --rm -v ${PWD}/..:/src outscale/wine-pyinstaller:0.0.1 --distpath ./pkg --clean --name osc-cli osc_sdk/sdk.py
$(SUDO) docker run --rm -v ${PWD}/..:/src outscale/wine-pyinstaller:0.0.1 --distpath ./pkg --clean --name osc-cli osc_sdk/sdk.py

clean:
rm -rvf *AppImage* osc-cli.AppDir osc-cli.zip osc-cli
Expand Down
6 changes: 5 additions & 1 deletion pkg/configure
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ PY_MAJ=3
PY_MID=9
ARCH_OLD=2010
ARCH_TARGET=x86_64
SUDO=""

for arg in $@; do
if [ "--help" = $arg ]; then
Expand All @@ -15,6 +16,9 @@ for arg in $@; do
echo " --arch_old=2010|2014|1 choose how oldness of linux targets"
return 0
fi
if [ "--sudo-docker" = $arg ]; then
SUDO="sudo"
fi
if [ "--py3_ver" = $( echo "$arg" | cut -d '=' -f 1) ]; then
PY_MID=$( echo $arg | cut -f 2 -d '=' )
echo "PREFIX FOUND IT'S: "$PY_MAJ
Expand All @@ -36,7 +40,7 @@ echo PY_STR=$PY_STR >> config.mk
echo -n PY_MIN= >> config.mk
echo $PY_TARGET | cut -d '.' -f 3 | cut -d '-' -f 1 >> config.mk
echo PY_TARGET=$PY_TARGET >> config.mk

echo SUDO=$SUDO >> config.mk

echo "config done:"
cat config.mk

0 comments on commit 1a78189

Please sign in to comment.