diff --git a/config/hooks/live/sublime_text.hook.chroot b/config/hooks/live/sublime_text.hook.chroot new file mode 100644 index 0000000..87d86a2 --- /dev/null +++ b/config/hooks/live/sublime_text.hook.chroot @@ -0,0 +1,9 @@ +#!/bin/sh + +wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/sublimehq-archive.gpg + +echo "deb http://download.sublimetext.com/ apt/stable/" > /etc/apt/sources.list.d/sublime-text.list + +apt-get update +apt-get install sublime-text sublime-merge -y +apt-get clean diff --git a/config/includes.chroot/etc/apt/sources.list.d/sublime-text.list b/config/includes.chroot/etc/apt/sources.list.d/sublime-text.list deleted file mode 100644 index fc956af..0000000 --- a/config/includes.chroot/etc/apt/sources.list.d/sublime-text.list +++ /dev/null @@ -1 +0,0 @@ -deb https://download.sublimetext.com/ apt/stable/ diff --git a/config/includes.chroot/etc/apt/trusted.gpg.d/sublimehq-archive.gpg b/config/includes.chroot/etc/apt/trusted.gpg.d/sublimehq-archive.gpg deleted file mode 100644 index b14b989..0000000 Binary files a/config/includes.chroot/etc/apt/trusted.gpg.d/sublimehq-archive.gpg and /dev/null differ diff --git a/config/package-lists/cli.list.chroot b/config/package-lists/cli.list.chroot index aad9952..ad31a3f 100644 --- a/config/package-lists/cli.list.chroot +++ b/config/package-lists/cli.list.chroot @@ -19,6 +19,7 @@ pigz bzip2 lbzip2 xz-utils +zstd p7zip-full p7zip-rar hwinfo diff --git a/config/package-lists/gui.list.chroot b/config/package-lists/gui.list.chroot index 82094f5..608262d 100644 --- a/config/package-lists/gui.list.chroot +++ b/config/package-lists/gui.list.chroot @@ -35,5 +35,3 @@ ssh-askpass-gnome tesseract-ocr tesseract-ocr-fra flatpak -sublime-text -sublime-merge diff --git a/make.sh b/make.sh index c940621..fbc45f5 100755 --- a/make.sh +++ b/make.sh @@ -24,7 +24,7 @@ pack_name[vm]="Driver Virtualisation" pack_forced=(live cli disk net firmware) -pack_default=(dm-common xfce4 gui vm) +pack_default=(dm-common xfce4 gui) _usage() { @@ -82,28 +82,49 @@ _check() _choose() { - declare -a checklist + declare -a pack_checklist size=$((${#pack_list[@]}-(${#pack_forced[@]}))) for pack in ${pack_list[@]}; do [[ "${pack_forced[*]}" =~ "$pack" ]] && continue [[ "${pack_default[*]}" =~ "$pack" ]] && status="ON" || status="OFF" - checklist+=($pack "${pack_name[$pack]}" $status) + pack_checklist+=($pack "${pack_name[$pack]}" $status) done - RESULT=$(whiptail --title "Make debian live system" --checklist "Select pack list" 15 70 ${size} "${checklist[@]}" 3>&1 1>&2 2>&3 | xargs) + RESULT=$(whiptail --title "Make debian live system" --checklist "Select pack list" 15 70 ${size} "${pack_checklist[@]}" 3>&1 1>&2 2>&3) + [[ "$?" = 1 ]] && printf "\e[91mCancel\e[0m\n" && exit - pack=("${pack_forced[@]} ${RESULT[@]}") + pack=("${pack_forced[@]} $(echo $RESULT | xargs)") printf "Pack list: \e[96m${pack[*]}\e[0m\n" - read -p "Continue ? " -n 1 -r - echo - if ! [[ $REPLY =~ ^[YyOo]$ ]] - then - echo "Cancel" - exit - fi + + nb_hooks=0 + declare -a hook_checklist + for file in $config/hooks/live/*; + do + basename="$(basename -s ".hook.chroot" $file)" + hook_checklist+=($basename "" "ON") + ((nb_hooks++)) + done + + #whiptail --separate-output --title "Make debian live system" --checklist "Select hooks to use" 15 70 ${nb_hooks} "${hook_checklist[@]}" + + RESULT=$(whiptail --title "Make debian live system" --checklist "Select hooks to use" 15 70 ${nb_hooks} "${hook_checklist[@]}" 3>&1 1>&2 2>&3) + [[ "$?" = 1 ]] && printf "\e[91mCancel\e[0m\n" && exit + + hooks=$(echo $RESULT | xargs) + + printf "Hooks list: \e[96m${hooks[*]}\e[0m\n" + +# read -p "Continue ? " -n 1 -r +# echo +# if ! [[ $REPLY =~ ^[YyOo]$ ]] +# then +# echo "Cancel" +# exit +# fi + } _config() @@ -116,9 +137,6 @@ _config() ln -sr $config/includes.chroot $build/config ln -sr $config/packages.chroot $build/config - mkdir -p $build/config/hooks - ln -sr $config/hooks/live $build/config/hooks - lb clean lb clean --cache @@ -143,6 +161,10 @@ _config() ln -sr $config/package-lists/$file.list.chroot $build/config/package-lists/$file.list.chroot done + for hook in ${hooks[@]}; do + ln -sr $config/hooks/live/$hook.hook.chroot $build/config/hooks/live/$hook.hook.chroot + done + } _build() @@ -158,6 +180,7 @@ _build() # Write commit hash and build date echo "$(git -C $baseDir log -1 --pretty='%cd %h %s' --date=format:"%F")" >> $build/chroot/etc/debian_version + echo "Build date: $(date +"%F %R")" >> $build/chroot/etc/debian_version }