Compare commits
No commits in common. "068e48799627d506c41c3f523267111728641384" and "3d3a37d79f51eaa68b17cc89256c81a59fdcea5d" have entirely different histories.
068e487996
...
3d3a37d79f
5 changed files with 76 additions and 4 deletions
74
src/init_target.sh
Executable file
74
src/init_target.sh
Executable file
|
@ -0,0 +1,74 @@
|
|||
#!/bin/bash
|
||||
|
||||
# populate Debian image
|
||||
#
|
||||
|
||||
# create a file descriptor for storing log
|
||||
|
||||
exec 3>/tmp/error.log
|
||||
|
||||
function error {
|
||||
>&2 printf "\e[31mE\e[0m: %s\n" "$1"
|
||||
}
|
||||
|
||||
erase_display_char () {
|
||||
local i
|
||||
local nchar
|
||||
nchar=$1
|
||||
i=0
|
||||
|
||||
while [ "$i" -lt "$nchar" ]; do
|
||||
printf "\b \b"
|
||||
((i=i + 1))
|
||||
done
|
||||
}
|
||||
|
||||
install_packages () {
|
||||
local package
|
||||
package="$1"
|
||||
|
||||
printf "Install %s: " "$package"
|
||||
apt-get install -y "$package" 2>&3 | while read -r x; do
|
||||
display=""
|
||||
pkg_name=""
|
||||
case $x in
|
||||
Get*)
|
||||
pkg_name=$(echo "$x" | awk '{ printf $5 }')
|
||||
display="downloading $pkg_name"
|
||||
;;
|
||||
Unpack*)
|
||||
pkg_name=$(echo "$x" | awk '{ printf $2 }')
|
||||
display="Unpacking $pkg_name"
|
||||
;;
|
||||
*already*newest*)
|
||||
pkg_name=$(echo "$x" | awk '{ printf $1 }')
|
||||
display="Already Installed"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
if [[ -n "$display" ]]
|
||||
then
|
||||
display="$display $pkg_name"
|
||||
erase_display_char "$nchar"
|
||||
printf "%s" "$display"
|
||||
nchar=${#display}
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
RECIPE_DIR="${SCRIPT_DIR}/recipe"
|
||||
|
||||
[[ ! -d "$RECIPE_DIR" ]] && { error "Recipe dir ${RECIPE_DIR} does not exist"; exit 10; }
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
export LC_ALL=C
|
||||
export LANGUAGE=C
|
||||
export LANG=C
|
||||
|
||||
for i in $RECIPE_DIR/*.sh
|
||||
do
|
||||
source $i
|
||||
done
|
||||
|
||||
exit 0
|
|
@ -42,7 +42,6 @@ function get_current_dir {
|
|||
current_dir=$(get_current_dir)
|
||||
scripts_dir="${current_dir}/scripts"
|
||||
|
||||
cd /tmp || { error "Can't go into /tmp"; exit 1; }
|
||||
for script in ${scripts_dir}/*.sh
|
||||
do
|
||||
source $script
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name="xserver"
|
||||
patches_dir="xserver_patches"
|
||||
clone_directory="xserver"
|
||||
clone_command="git clone --depth 1 --branch=xorg-server-1.20.11 https://gitlab.freedesktop.org/xorg/xserver.git"
|
||||
clone_command="git clone --depth 1 --branch-xorg-server-1.20.11 https://gitlab.freedesktop.org/xorg/xserver.git"
|
||||
configure_command="meson build -Dxorg=true -Dxwayland=true -Dglamor=true -Dxwayland_eglstream=false -Dxnest=false -Ddmx=false -Dxvfb=true -Dxwin=false -Dxephyr=false -Ddri3=true"
|
||||
build_command="ninja -C build install"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name="Cage"
|
||||
patches_dir=0
|
||||
clone_directory="cage"
|
||||
clone_command="git clone --branch=v0.1.2.1--depth 1 https://github.com/Hjdskes/cage.git"
|
||||
clone_command="git clone --depth 1 https://github.com/Hjdskes/cage.git"
|
||||
configure_command="meson build"
|
||||
build_command="ninja -C build install"
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ libxshmfence-dev
|
|||
libxxf86vm-dev
|
||||
llvm-dev
|
||||
make
|
||||
mesa-common-dev
|
||||
meson
|
||||
nettle-dev
|
||||
patch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue