2022-05-30 10:42:24 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo "### installation de emacs avec la config TK"
|
|
|
|
echo "### ce script suppose que vous ayez Apt et Bash"
|
|
|
|
|
2022-07-06 16:16:12 +02:00
|
|
|
|
2022-10-08 10:57:22 +02:00
|
|
|
username=$USER
|
2022-07-06 16:16:12 +02:00
|
|
|
|
2022-10-08 10:57:22 +02:00
|
|
|
# installation des dépendances
|
2022-10-11 18:41:19 +02:00
|
|
|
sudo apt install snapd git arp-scan wget
|
2022-05-30 10:42:24 +02:00
|
|
|
snap install emacs --channel-beta --classic
|
|
|
|
emacs --version
|
|
|
|
|
2022-10-08 10:57:22 +02:00
|
|
|
# faire des sauvegardes si ces documents existent déjà
|
|
|
|
if test -f /home/$username/.emacs; then
|
|
|
|
echo "config .emacs existante, on fait une copie de sauvegarde."
|
|
|
|
mv /home/$username/.emacs /home/$username/.emacs_backup
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -f /home/$username/Nextcloud/textes/orgmode/tasks.org; then
|
|
|
|
echo "Fichier de tâches Orgmode existant, on fait une copie de sauvegarde."
|
|
|
|
mv /home/$username/Nextcloud/textes/orgmode/tasks.org /home/$username/tasks.org.backup
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# créer les dossiers nextcloud dont on a besoin
|
2022-05-30 10:42:24 +02:00
|
|
|
mkdir -p ~/Nextcloud/textes/orgmode/org-roam
|
|
|
|
mkdir -p ~/Nextcloud/textes/library
|
|
|
|
|
2022-07-06 22:20:42 +02:00
|
|
|
rm -rf /home/$username/.emacs.d
|
|
|
|
cp /home/$username/.emacs .emacs_backup
|
2022-05-30 10:42:24 +02:00
|
|
|
|
2022-10-08 10:57:22 +02:00
|
|
|
# prendre les documents d'exemple'
|
2022-07-06 22:20:42 +02:00
|
|
|
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/.emacs --directory-prefix="/home/$username/"
|
2022-10-08 10:57:22 +02:00
|
|
|
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/config.org --directory-prefix="/home/$username/Nextcloud/textes/orgmode/"
|
|
|
|
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/tasks.org --directory-prefix="/home/$username/Nextcloud/textes/orgmode/"
|
2022-07-06 22:20:42 +02:00
|
|
|
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/bulma.min.css --directory-prefix="/home/$username/Nextcloud/textes/orgmode/"
|
|
|
|
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/style.css --directory-prefix="/home/$username/Nextcloud/textes/orgmode/"
|
|
|
|
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/upcalendar.sh --directory-prefix="/home/$username/Nextcloud/textes/orgmode/"
|
2022-08-03 11:56:56 +02:00
|
|
|
|
2022-05-30 10:42:24 +02:00
|
|
|
|
2022-10-08 10:57:22 +02:00
|
|
|
cd /home/$username/Nextcloud/textes
|
|
|
|
git init
|
|
|
|
git add .
|
|
|
|
git status
|
2022-05-30 10:42:24 +02:00
|
|
|
|
|
|
|
|
2022-10-08 10:57:22 +02:00
|
|
|
cd cd /home/$username/Nextcloud/textes/orgmode
|
|
|
|
pwd
|
|
|
|
echo "### voilà, ça c'est fait. Dépot initialisé avec des fichiers d'exemple'"
|