Pre-compile Python scripts in build_linux
This commit is contained in:
parent
24e4f7ddcc
commit
47ccd7dd91
1 changed files with 4 additions and 0 deletions
|
|
@ -80,6 +80,10 @@ function copy_live_env() {
|
|||
mkdir -p "$PROFILE_DIR/airootfs/usr/local/bin"
|
||||
rsync -aI "$ROOT_DIR/scripts/" "$PROFILE_DIR/airootfs/usr/local/bin/"
|
||||
|
||||
# Pre-compile Python scripts
|
||||
unset PYTHONPYCACHEPREFIX
|
||||
python -m compileall "$PROFILE_DIR/airootfs/usr/local/bin/"
|
||||
|
||||
# Update profiledef.sh to set proper permissions for executable files
|
||||
for _file in $(find "$PROFILE_DIR/airootfs" -executable -type f | sed "s%$PROFILE_DIR/airootfs%%" | sort); do
|
||||
sed -i "\$i\ [\"$_file\"]=\"0:0:755\"" "$PROFILE_DIR/profiledef.sh"
|
||||
|
|
|
|||
Loading…
Reference in a new issue