Skip to content

Commit

Permalink
Latest final-process (from share module)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hayao0819 committed May 23, 2021
1 parent 91824c6 commit fa75b06
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 56 deletions.
92 changes: 62 additions & 30 deletions data/calamares.desktop
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=Install Alter Linux
GenericName=Alter Linux Installer
Keywords=calamares;alter;linux;installer;
Name=Install System
GenericName=System Installer
Keywords=calamares;system;installer;
TryExec=calamares
Exec=pkexec /usr/bin/calamares
Comment=Alter Linux Installer - by Calamares
Exec=sh -c "sudo -E calamares"
Comment=Calamares — System Installer
Icon=calamares
Terminal=false
StartupNotify=true
Expand All @@ -21,6 +21,10 @@ Name[as]=চিছটেম ইনস্তল কৰক
Icon[as]=কেলামাৰেচ
GenericName[as]=চিছটেম ইনস্তলাৰ
Comment[as]=কেলামাৰেচ — চিছটেম​ ইনস্তলাৰ
Name[az]=Sistemi Quraşdırmaq
Icon[az]=calamares
GenericName[az]=Sistem Quraşdırıcısı
Comment[az]=Calamares Sistem Quraşdırıcısı
Name[be]=Усталяваць сістэму
Icon[be]=calamares
GenericName[be]=Усталёўшчык сістэмы
Expand All @@ -29,26 +33,30 @@ Name[bg]=Инсталирай системата
Icon[bg]=calamares
GenericName[bg]=Системен Инсталатор
Comment[bg]=Calamares — Системен Инсталатор
Name[bn]=সিস্টেম ইনস্টল করুন
Icon[bn]=ক্যালামারেস
GenericName[bn]=সিস্টেম ইনস্টলার
Comment[bn]=ক্যালামারেস - সিস্টেম ইনস্টলার
Name[ca]=Instal·la el sistema
Icon[ca]=calamares
GenericName[ca]=Instal·lador de sistema
Comment[ca]=Calamares — Instal·lador de sistema
Name[da]=Installér AlterLinux
Name[da]=Installér system
Icon[da]=calamares
GenericName[da]=AlterLinuxinstallationsprogram
Comment[da]=Calamares — AlterLinuxinstallationsprogram
Name[de]=AlterLinux installieren
GenericName[da]=Systeminstallationsprogram
Comment[da]=Calamares — Systeminstallationsprogram
Name[de]=System installieren
Icon[de]=calamares
GenericName[de]=Installation des BetriebsAlterLinuxs
Comment[de]=Calamares - Installation des BetriebsAlterLinuxs
GenericName[de]=Installation des Betriebssystems
Comment[de]=Calamares - Installation des Betriebssystems
Name[el]=Εγκατάσταση συστήματος
Icon[el]=calamares
GenericName[el]=Εγκατάσταση συστήματος
Comment[el]=Calamares — Εγκατάσταση συστήματος
Name[en_GB]=Install AlterLinux
Name[en_GB]=Install System
Icon[en_GB]=calamares
GenericName[en_GB]=AlterLinux Installer
Comment[en_GB]=Calamares — AlterLinux Installer
GenericName[en_GB]=System Installer
Comment[en_GB]=Calamares — System Installer
Name[es]=Instalar Sistema
Icon[es]=calamares
GenericName[es]=Instalador del Sistema
Expand All @@ -61,11 +69,19 @@ Name[eu]=Sistema instalatu
Icon[eu]=calamares
GenericName[eu]=Sistema instalatzailea
Comment[eu]=Calamares - sistema instalatzailea
Name[fa]=نصب سامانه
Icon[fa]=کالامارس
GenericName[fa]=نصب‌کنندهٔ سامانه
Comment[fa]=کالامارس — نصب‌کنندهٔ سامانه
Name[es_PR]=Instalar el sistema
Name[fr]=Installer le système
Icon[fr]=calamares
GenericName[fr]=Installateur système
Comment[fr]=Calamares - Installateur système
Name[fur]=Instale il sisteme
Icon[fur]=calamares
GenericName[fur]=Program di instalazion dal sisteme
Comment[fur]=Calamares — Program di instalazion dal sisteme
Name[gl]=Instalación do Sistema
Icon[gl]=calamares
GenericName[gl]=Instalador de sistemas
Expand All @@ -82,6 +98,10 @@ Name[hr]=Instaliraj sustav
Icon[hr]=calamares
GenericName[hr]=Instalacija sustava
Comment[hr]=Calamares — Instalacija sustava
Name[ie]=Installar li sistema
Icon[ie]=calamares
GenericName[ie]=Installator del sistema
Comment[ie]=Calamares — Installator del sistema
Name[hu]=Rendszer telepítése
Icon[hu]=calamares
GenericName[hu]=Rendszertelepítő
Expand All @@ -98,10 +118,10 @@ Name[cs_CZ]=Nainstalovat systém
Icon[cs_CZ]=calamares
GenericName[cs_CZ]=Instalátor systému
Comment[cs_CZ]=Calamares – instalátor operačních systémů
Name[ja]=AlterLinuxをインストール
Name[ja]=システムをインストール
Icon[ja]=calamares
GenericName[ja]=AlterLinuxインストーラー
Comment[ja]=Calamares — AlterLinuxインストーラー
GenericName[ja]=システムインストーラー
Comment[ja]=Calamares — システムインストーラー
Name[ko]=시스템 설치
Icon[ko]=깔라마레스
GenericName[ko]=시스템 설치 관리자
Expand All @@ -122,18 +142,22 @@ Name[ml]=സിസ്റ്റം ഇൻസ്റ്റാൾ ചെയ്യു
Icon[ml]=കലാമാരേസ്
GenericName[ml]=സിസ്റ്റം ഇൻസ്റ്റാളർ
Comment[ml]=കലാമാരേസ് - സിസ്റ്റം ഇൻസ്റ്റാളർ
Name[nb]=Installer AlterLinux
Name[nb]=Installer System
Icon[nb]=calamares
GenericName[nb]=AlterLinuxinstallatør
Comment[nb]=Calamares-AlterLinuxinstallatør
GenericName[nb]=Systeminstallatør
Comment[nb]=Calamares-systeminstallatør
Name[nl]=Installeer systeem
Icon[nl]=calamares
GenericName[nl]=Installatieprogramma
Comment[nl]=Calamares — Installatieprogramma
Name[pl]=Zainstaluj AlterLinux
Name[az_AZ]=Sistemi quraşdırmaq
Icon[az_AZ]=calamares
GenericName[az_AZ]=Sistem quraşdırcısı
Comment[az_AZ]=Calamares — Sistem Quraşdırıcısı
Name[pl]=Zainstaluj system
Icon[pl]=calamares
GenericName[pl]=Instalator AlterLinux
Comment[pl]=Calamares — Instalator AlterLinux
GenericName[pl]=Instalator systemu
Comment[pl]=Calamares — Instalator systemu
Name[pt_BR]=Sistema de Instalação
Icon[pt_BR]=calamares
GenericName[pt_BR]=Instalador de Sistema
Expand All @@ -155,24 +179,32 @@ Name[sq]=Instalo Sistemin
Icon[sq]=calamares
GenericName[sq]=Instalues Sistemi
Comment[sq]=Calamares — Instalues Sistemi
Name[fi_FI]=Asenna Järjestelmä
Name[fi_FI]=Asenna järjestelmä
Icon[fi_FI]=calamares
GenericName[fi_FI]=Järjestelmän Asennusohjelma
Comment[fi_FI]=Calamares — Järjestelmän Asentaja
GenericName[fi_FI]=Järjestelmän asennusohjelma
Comment[fi_FI]=Calamares — Järjestelmän asentaja
Name[sr@latin]=Instaliraj sistem
Name[sr]=Инсталирај систем
Icon[sr]=calamares
GenericName[sr]=Инсталатер система
Comment[sr]=Каламарес — инсталатер система
Name[sv]=Installera AlterLinux
Name[sv]=Installera system
Icon[sv]=calamares
GenericName[sv]=AlterLinuxinstallerare
Comment[sv]=Calamares — AlterLinuxinstallerare
GenericName[sv]=Systeminstallerare
Comment[sv]=Calamares — Systeminstallerare
Name[tg]=Насбкунии низом
Icon[tg]=calamares
GenericName[tg]=Насбкунандаи низомӣ
Comment[tg]=Calamares — Насбкунандаи низомӣ
Name[th]=ติดตั้งระบบ
Name[uk]=Встановити Систему
Icon[uk]=calamares
GenericName[uk]=Встановлювач системи
Comment[uk]=Calamares - Встановлювач системи
Name[vi]=Cài đặt hệ thống
Icon[vi]=calamares
GenericName[vi]=Bộ cài đặt hệ thống
Comment[vi]=Calamares — Bộ cài đặt hệ thống
Name[zh_CN]=安装系统
Icon[zh_CN]=calamares
GenericName[zh_CN]=系统安装程序
Expand Down Expand Up @@ -204,4 +236,4 @@ Comment[pt_PT]=Calamares - Instalador de Sistema
Name[tr_TR]=Sistemi Yükle
Icon[tr_TR]=calamares
GenericName[tr_TR]=Sistem Yükleyici
Comment[tr_TR]=Calamares — Sistem Yükleyici
Comment[tr_TR]=Calamares — Sistem Yükleyici
67 changes: 41 additions & 26 deletions data/final-process
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
#!/usr/bin/env bash

set -e

script_path="$( cd -P "$( dirname "$(readlink -f "${0}")" )" && pwd )"
script_name="$(basename "$(realpath "${0}")")"

function remove () {
local list
local file
list=($(echo "$@"))
for file in "${list[@]}"; do
if [[ -f ${file} ]]; then
rm -f "${file}"
elif [[ -d ${file} ]]; then
rm -rf "${file}"
fi
done
rm -rf "${@}"
}

while getopts 'u:' arg; do
Expand All @@ -19,35 +15,54 @@ while getopts 'u:' arg; do
esac
done

function remove_user_file(){
remove "/etc/skel/${@}"
remove "/home/${user}/${@}"
}


remove /etc/skel/Desktop
remove /etc/skel/.config/gtk-3.0/bookmarks
remove /home/${user}/Desktop/calamares.desktop
remove /root/Desktop/calamares.desktop
remove /home/${user}/.config/gtk-3.0/bookmarks
remove /usr/share/calamares/

remove_user_file "Desktop/calamares.desktop"
remove_user_file ".config/gtk-3.0/bookmarks"


remove /etc/polkit-1/rules.d/01-nopasswork.rules

# Delete unnecessary files of archiso.
# See the following site for details.
# https://wiki.archlinux.jp/index.php/Archiso#Chroot_.E3.81.A8.E3.83.99.E3.83.BC.E3.82.B9.E3.82.B7.E3.82.B9.E3.83.86.E3.83.A0.E3.81.AE.E8.A8.AD.E5.AE.9A

remove /etc/systemd/system/[email protected]/autologin.conf
remove /root/.automated_script.sh
remove /etc/mkinitcpio-archiso.conf
remove /etc/initcpio

# Delete systemd files
remove /etc/systemd/journald.conf.d/volatile-storage.conf
remove /airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf

remove /etc/udev/rules.d/81-dhcpcd.rules
remove /etc/systemd/system/[email protected]
remove /etc/systemd/system/alteriso-reflector.service

if [[ -f /etc/systemd/journald.conf ]]; then
sed -i 's/Storage=volatile/#Storage=auto/' /etc/systemd/journald.conf
fi

# Disabled auto login
# Disabled auto login for LightDM
if [[ -f "/etc/lightdm/lightdm.conf" ]]; then
sed -i "s/^autologin/#autologin/g" "/etc/lightdm/lightdm.conf"
fi
remove "/etc/lightdm/lightdm.conf.d/02-autologin-"*

# Disabled auto login for GDM
if [[ -f "/etc/gdm/custom.conf" ]]; then
sed -i "s/Automatic*/#Automatic/g" "/etc/gdm/custom.conf"
fi

# Remove dconf for live environment
remove "/etc/dconf/db/local.d/02-disable-lock"
remove "/etc/dconf/db/local.d/02-live-"*

# Update system datebase
if type dconf > /dev/null 2>&1 ; then
dconf update
fi

# 追加のスクリプトを実行
if [[ -d "${script_path}/${script_name}.d/" ]]; then
for extra_script in "${script_path}/${script_name}.d/"*; do
bash -c "${extra_script} ${user}"
done
fi

0 comments on commit fa75b06

Please sign in to comment.