File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 1+ 2024-11-23
2+
3+ * Improve (and fix) entrypoint.sh
4+
152024-02-12
26
37 * Convert Action to a container
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ set -e
4+
35echo " "
4- echo " linuxdeploy Build Helper Container v2.0.0 "
6+ echo " linuxdeploy Build Helper Container v2.0.1 "
57echo " https://github.com/andy5995/linuxdeploy-build-helper-container"
68echo " "
79
810OLDPWD=$PWD
911
10- if [ -z " HOSTUID" ]; then
12+ if [ -z " $ HOSTUID" ]; then
1113 echo " HOSTUID is not set."
1214 exit 1
1315fi
1416
17+ if [ -z " $HOSTGID " ]; then
18+ echo " HOSTGID is not set."
19+ exit 1
20+ fi
21+
1522if [ -z " $1 " ]; then
1623 echo " One argument required -- the name of a script to run."
1724 exit 1
1825fi
1926
20- usermod -u $HOSTUID builder
21- su builder -c " PATH=/home/builder/.local/bin:$PATH && cd $OLDPWD && $1 "
27+ usermod -u " $HOSTUID " builder
28+ chown -R " $HOSTUID :$HOSTGID " /home/builder
29+
30+ # The docs state to use '-w /workdir when running the container, but switching
31+ # to builder here will change the directory. Using cd to change back...
32+ su builder -l -c " cd $OLDPWD && $1 "
You can’t perform that action at this time.
0 commit comments