Ask for hooks
This commit is contained in:
parent
e9a451ad1d
commit
ebff05aea4
9
config/hooks/live/sublime_text.hook.chroot
Normal file
9
config/hooks/live/sublime_text.hook.chroot
Normal file
@ -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
|
@ -1 +0,0 @@
|
||||
deb https://download.sublimetext.com/ apt/stable/
|
Binary file not shown.
@ -19,6 +19,7 @@ pigz
|
||||
bzip2
|
||||
lbzip2
|
||||
xz-utils
|
||||
zstd
|
||||
p7zip-full
|
||||
p7zip-rar
|
||||
hwinfo
|
||||
|
@ -35,5 +35,3 @@ ssh-askpass-gnome
|
||||
tesseract-ocr
|
||||
tesseract-ocr-fra
|
||||
flatpak
|
||||
sublime-text
|
||||
sublime-merge
|
||||
|
53
make.sh
53
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
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user