add demo land
This commit is contained in:
parent
56b6a60ee8
commit
1848dba730
@ -1,13 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
##################
|
||||
#
|
||||
# pour lancer l'installation de la config de démo:
|
||||
# wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/install_emacs_tk.sh | bash
|
||||
#
|
||||
##################
|
||||
|
||||
echo "### installation de emacs avec la config TK"
|
||||
echo "### ce script suppose que vous ayez Apt et Bash"
|
||||
|
||||
|
||||
username=$USER
|
||||
orgmode_folder_demo="/home/$username/Nextcloud/textes/orgmode/demo"
|
||||
|
||||
# installation des dépendances
|
||||
sudo apt install snapd git arp-scan wget
|
||||
echo " installation des dépendances"
|
||||
|
||||
sudo apt install snapd git arp-scan wget kompare
|
||||
snap install emacs --channel-beta --classic
|
||||
emacs --version
|
||||
|
||||
@ -17,30 +27,33 @@ if test -f /home/$username/.emacs; then
|
||||
mv /home/$username/.emacs /home/$username/.emacs_backup
|
||||
fi
|
||||
|
||||
if test -f /home/$username/Nextcloud/textes/orgmode/tasks.org; then
|
||||
if test -d $orgmode_folder_demo; then
|
||||
fi
|
||||
|
||||
if test -f $orgmode_folder_demo/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
|
||||
mv $orgmode_folder_demo/tasks.org /home/$username/tasks.org.backup
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# créer les dossiers nextcloud dont on a besoin
|
||||
mkdir -p ~/Nextcloud/textes/orgmode/org-roam
|
||||
mkdir -p ~/Nextcloud/textes/library
|
||||
mkdir -p $orgmode_folder_demo/org-roam
|
||||
mkdir -p $orgmode_folder_demo/library
|
||||
|
||||
rm -rf /home/$username/.emacs.d
|
||||
cp /home/$username/.emacs .emacs_backup
|
||||
|
||||
# prendre les documents d'exemple'
|
||||
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/.emacs --directory-prefix="/home/$username/"
|
||||
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/"
|
||||
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/"
|
||||
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/config.org --directory-prefix="$orgmode_folder_demo"
|
||||
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/tasks.org --directory-prefix=="$orgmode_folder_demo"
|
||||
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/bulma.min.css --directory-prefix=="$orgmode_folder_demo"
|
||||
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/style.css --directory-prefix=="$orgmode_folder_demo"
|
||||
wget https://forge.chapril.org/tykayn/scripts/raw/branch/master/assets/org/upcalendar.sh --directory-prefix=="$orgmode_folder_demo"
|
||||
|
||||
|
||||
cd /home/$username/Nextcloud/textes
|
||||
cd $orgmode_folder_demo
|
||||
git init
|
||||
git add .
|
||||
git status
|
||||
@ -49,3 +62,9 @@ git status
|
||||
cd cd /home/$username/Nextcloud/textes/orgmode
|
||||
pwd
|
||||
echo "### voilà, ça c'est fait. Dépot initialisé avec des fichiers d'exemple'"
|
||||
echo "### "
|
||||
echo "### pour lancer l'exemple:"
|
||||
echo "### emacs -Q l $orgmode_folder_demo/.emacs_demo"
|
||||
echo "### "
|
||||
echo "### pour transformer l'exemple en fichier par défaut:"
|
||||
echo "### mv $orgmode_folder_demo/.emacs_demo /home/$username/.emacs"
|
||||
|
Loading…
Reference in New Issue
Block a user