mirror of
https://gitlab.com/JKANetwork/JKArch.git
synced 2026-02-16 10:11:32 +01:00
Updated installer and scripts
This commit is contained in:
@@ -1,3 +1,2 @@
|
||||
# Scripts usados por JKANetwork para generar las imagenes de CD que estan en jkarch.jkanetwork.com
|
||||
|
||||
# NO FUNCIONA / NOT WORK
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
## This file download all JKArch dependencies and puts it in a folder with repo created, ready to use
|
||||
|
||||
#Force sudo
|
||||
if [[ $(/usr/bin/id -u) != "0" ]];then
|
||||
sudo ${0} $@
|
||||
exit
|
||||
fi
|
||||
|
||||
rm -rf trydeps/
|
||||
rm -rf repoofflinejkarch/
|
||||
mkdir trydeps
|
||||
#Only pacstrap for the essential packages for download the rest, pacman, and mirrorlist. Base added to pacman -Sw of later
|
||||
pacstrap -d trydeps pacman jkarch-mirrorlist
|
||||
cp /etc/pacman.conf trydeps/etc/pacman.conf
|
||||
|
||||
arch-chroot trydeps/ /usr/bin/pacman -Sw base base-devel yaourt btrfs-progs rsync exfat-utils jkarch-mirrorlist jka-toolkit git wget netctl iw wpa_supplicant dialog sudo alsa-utils dosfstools \
|
||||
ntfs-3g bash-completion reflector ntp \
|
||||
mesa libva-vdpau-driver mesa-libgl libva-mesa-driver mesa-vdpau libva-intel-driver libvdpau-va-gl virtualbox-guest-utils virtualbox-guest-modules-arch xf86-input-vmmouse open-vm-tools \
|
||||
firefox google-chrome chromium opera otter-browser flashplugin \
|
||||
libreoffice-fresh abiword gnumeric wps-office leafpad gedit notepadqq \
|
||||
vlc qt4 smplayer totem clementine \
|
||||
gimp inkscape pinta krita \
|
||||
noto-fonts noto-fonts-cjk noto-fonts-emoji ttf-dejavu ttf-liberation ttf-ms-fonts ttf-google-fonts-git \
|
||||
evince ristretto librsvg gnome-calculator gnome-disk-utility file-roller lrzip p7zip unace unrar tumbler poppler-glib ffmpegthumbnailer libgsf \
|
||||
cups cups-filters cups-pk-helper system-config-printer gtk3-print-backends hplip foomatic-db-engine foomatic-db foomatic-db-ppds xsane bluez bluez-utils bluez-cups bluez-firmware bluez-libs blueberry \
|
||||
dropbox megasync geary k3b jre8-openjdk wine-staging wine_gecko winetricks lib32-libpng lib32-libldap lib32-gnutls lib32-mpg123 lib32-libpulse lib32-ncurses lib32-openal lib32-alsa-lib lib32-gst-plugins-base-libs bleachbit \
|
||||
sublime-text-dev sublime-text visual-studio-code jdk8-openjdk eclipse-java monodevelop brackets atom-editor-bin gdevelop poedit arduino \
|
||||
xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-afc gvfs-smb udisks2 networkmanager network-manager-applet gnome-keyring xdialog \
|
||||
jkarch-appearance lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs xfce4-power-manager \
|
||||
lxappearance lxappearance-obconf lxde-common lxinput lxpanel lxrandr lxsession lxtask lxterminal openbox pcmanfm xfce4-notifyd \
|
||||
xfce4 cinnamon gnome-extra gnome mate-extra mate gtk-engine-murrine plasma gtk-engine-aurora faenza-icon-theme \
|
||||
efibootmgr dosfstools refind-efi grub os-prober --noconfirm
|
||||
|
||||
arch-chroot trydeps/ /usr/bin/pacman -Sw $(pacman -Ssq xf86-video-*) --noconfirm
|
||||
mkdir repoofflinejkarch
|
||||
mv trydeps/var/cache/pacman/pkg/* repoofflinejkarch/
|
||||
rm -rf trydeps/
|
||||
cd repoofflinejkarch/
|
||||
repo-add localjkarch.db.tar.gz *.pkg.*
|
||||
rm localjkarch.files
|
||||
rm localjkarch.db
|
||||
mv localjkarch.files.tar.gz localjkarch.files
|
||||
mv localjkarch.db.tar.gz localjkarch.db
|
||||
rm -f *.old
|
||||
rm -f *.log
|
||||
rm -f .log
|
||||
cd ..
|
||||
#Permisos
|
||||
chmod 777 repoofflinejkarch/
|
||||
chmod 666 repoofflinejkarch/*
|
||||
@@ -29,11 +29,11 @@ function modifyimage {
|
||||
|
||||
|
||||
#Delete packages not needed from official iso
|
||||
sudo arch-chroot $sfslocate/ /usr/bin/pacman -R clonezilla darkhttpd diffutils grml-zsh-config irssi linux-atm lvm2 man-db man-pages mc ndisc6 nmap smartmontools testdisk vi vim vim-runtime zsh openconnect pcsclite python2 --noconfirm
|
||||
sudo arch-chroot $sfslocate/ /usr/bin/pacman -R clonezilla darkhttpd diffutils grml-zsh-config irssi linux-atm lvm2 man-db man-pages mc ndisc6 nmap smartmontools testdisk vi vim vim-runtime openconnect pcsclite python2 python reflector --noconfirm
|
||||
#Restore bash shell (not zsh)
|
||||
sudo arch-chroot $sfslocate/ /usr/bin/chsh -s /bin/bash root
|
||||
#Install new
|
||||
sudo arch-chroot $sfslocate/ /usr/bin/pacman -Su gparted xf86-video-vesa xorg-xinit lwm localepurge --noconfirm --ignore linux #Do not upgrade kernel automatically
|
||||
sudo arch-chroot $sfslocate/ /usr/bin/pacman -Su gparted xf86-video-vesa xorg-xinit lwm xorg-xrandr xterm localepurge --noconfirm --ignore linux #Do not upgrade kernel automatically
|
||||
#For gparted to work
|
||||
sudo rm $sfslocate/etc/X11/xinit/xinitrc
|
||||
sudo touch $sfslocate/etc/X11/xinit/xinitrc
|
||||
@@ -80,13 +80,8 @@ function bashprofile {
|
||||
sudo echo "#" > $sfslocate/root/.bash_profile
|
||||
sudo echo "# ~/.bash_profile" >> $sfslocate/root/.bash_profile
|
||||
sudo echo "#" >> $sfslocate/root/.bash_profile
|
||||
if [[ $1 = "Online" ]];then
|
||||
sudo echo "cd /root/" >> $sfslocate/root/.bash_profile
|
||||
sudo echo "./downloadinstall.sh" >> $sfslocate/root/.bash_profile
|
||||
else #Offline
|
||||
sudo echo "cd /root/offlinefiles/" >> $sfslocate/root/.bash_profile
|
||||
sudo echo "./selectlang.sh" >> $sfslocate/root/.bash_profile
|
||||
fi
|
||||
sudo echo "cd /root/" >> $sfslocate/root/.bash_profile
|
||||
sudo echo "./downloadinstall.sh" >> $sfslocate/root/.bash_profile
|
||||
sudo echo "[[ -f ~/.bashrc ]] && . ~/.bashrc" >> $sfslocate/root/.bash_profile
|
||||
}
|
||||
|
||||
@@ -103,70 +98,6 @@ function prepareISOFolder {
|
||||
cp temp/airootfs.sfs iso/arch/x86_64/airootfs.sfs
|
||||
}
|
||||
|
||||
##Function online iso create
|
||||
function createOnline {
|
||||
# Online ISO Procedure
|
||||
#Copy important files
|
||||
prepareISOFolder
|
||||
|
||||
sudo unsquashfs -d $sfslocate/ iso/arch/x86_64/airootfs.sfs
|
||||
|
||||
#Permisos de root de la imagen cambiar temporalmente
|
||||
sudo chmod 777 $sfslocate/root/
|
||||
sudo rm $sfslocate/root/*
|
||||
|
||||
#.bash_profile Online
|
||||
bashprofile "Online"
|
||||
|
||||
#Copiar fichero instalador
|
||||
sudo cp ../archinstall/downloadinstall.sh $sfslocate/root/
|
||||
|
||||
#Resto de modificaciones (las comunes) y cerrado del sfs
|
||||
modifyimage
|
||||
|
||||
#Creamos la ISO
|
||||
mkisofs -b isolinux/isolinux.bin -r -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "JKARCH-ISO" -o JKArch-Online-$yearmonth.iso iso/
|
||||
sudo rm -rf iso/
|
||||
echo "ISO Online creada"
|
||||
}
|
||||
|
||||
function createOffline {
|
||||
# Offline ISO Procedure
|
||||
#Copy important files
|
||||
prepareISOFolder
|
||||
|
||||
#Unsquash sfs file
|
||||
sudo unsquashfs -d $sfslocate/ iso/arch/x86_64/airootfs.sfs
|
||||
|
||||
#Permisos de root de la imagen cambiar temporalmente
|
||||
sudo chmod 777 $sfslocate/root/
|
||||
sudo rm $sfslocate/root/*
|
||||
|
||||
#.bash_profile Offline
|
||||
bashprofile "Offline"
|
||||
|
||||
#Create subfolder and folder at same time
|
||||
sudo mkdir -p $sfslocate/root/offlinefiles/mods/
|
||||
#Esta ruta es absoluta, no vale para todos los sistemas (Es "temporal")
|
||||
sudo cp ../archinstall/* $sfslocate/root/offlinefiles/
|
||||
sudo rm $sfslocate/root/offlinefiles/downloadinstall.sh $sfslocate/root/offlinefiles/archinstall-dev.sh
|
||||
sudo cp ../mods/* $sfslocate/root/offlinefiles/mods/
|
||||
|
||||
#Resto de modificaciones (las comunes) y cerrado del sfs
|
||||
modifyimage
|
||||
|
||||
#Creamos el repositorio
|
||||
sudo sh depsjkarch.sh
|
||||
#Lo movemos a su sitio
|
||||
mkdir -p iso/repo/
|
||||
mv repoofflinejkarch/* iso/repo/
|
||||
rm -rf repoofflinejkarch/
|
||||
|
||||
#Creamos la ISO
|
||||
mkisofs -b isolinux/isolinux.bin -r -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "JKARCH-ISO" -o JKArch-Offline-$yearmonth.iso iso/
|
||||
sudo rm -rf iso/
|
||||
echo "ISO Offline creada"
|
||||
}
|
||||
|
||||
#Date for builds
|
||||
today=$(date +%y%m%d)
|
||||
@@ -193,13 +124,28 @@ if [[ $today != $lastdownload ]];then #Only download one time at day
|
||||
fi
|
||||
|
||||
|
||||
#Switch del argumento $1 para ver si solo se quiere crear una de las dos imagenes iso
|
||||
case $1 in
|
||||
"Online") createOnline;;
|
||||
"Offline") createOffline;;
|
||||
"")
|
||||
createOnline
|
||||
createOffline
|
||||
;;
|
||||
esac
|
||||
# Create ISO Procedure
|
||||
#Copy important files
|
||||
prepareISOFolder
|
||||
|
||||
sudo unsquashfs -d $sfslocate/ iso/arch/x86_64/airootfs.sfs
|
||||
|
||||
#Permisos de root de la imagen cambiar temporalmente
|
||||
sudo chmod 777 $sfslocate/root/
|
||||
sudo rm $sfslocate/root/*
|
||||
|
||||
#.bash_profile
|
||||
bashprofile
|
||||
|
||||
#Copiar fichero instalador
|
||||
sudo cp ../archinstall/downloadinstall.sh $sfslocate/root/
|
||||
|
||||
#Resto de modificaciones (las comunes) y cerrado del sfs
|
||||
modifyimage
|
||||
|
||||
#Creamos la ISO
|
||||
mkisofs -b isolinux/isolinux.bin -r -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "JKARCH-ISO" -o JKArch-Online-$yearmonth.iso iso/
|
||||
sudo rm -rf iso/
|
||||
echo "ISO creado"
|
||||
|
||||
echo "Script terminado"
|
||||
Reference in New Issue
Block a user