user.dash 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. #!/bin/dash
  2. cd
  3. if [ ! -d ~/.emacs.d ]; then
  4. git clone --depth=1 https://codeberg.org/srv/.emacs.d ~/.emacs.d
  5. fi
  6. if [ -d ~/.emacs.d ] && [ ! -d ~/.emacs.d/.git ]; then
  7. TMP=$(echo -n $(mktemp -u | cut -d. -f2))
  8. mv ~/.emacs.d "$HOME/.emacs.d.$TMP.backup"
  9. git clone --depth=1 https://codeberg.org/srv/.emacs.d ~/.emacs.d
  10. fi
  11. #if false; then
  12. # wget https://c.hgit.ga/software/hyperterm.git/plain/install.sh -O ~/.install.sh
  13. # sh ~/.install.sh
  14. #fi
  15. if [ -d ~/.emacs.d/.git ]; then
  16. if lsb_release -a 2>&1 | grep -q yperbola; then
  17. doas pacman -S --noconfirm xdg-user-dirs
  18. fi
  19. if [ -d ~/.emacs.d/hyperterm ]; then
  20. ln -svf ~/.emacs.d/hyperterm ~/.hyperterm
  21. fi
  22. if [ -f ~/.bashrc ]; then
  23. mv ~/.bashrc ~/.bashrc.bk
  24. ln -svf ~/.emacs.d/p/ln/bashrc ~/.bashrc
  25. fi
  26. if [ -f ~/.hyperterm/_custom.sh ] && \
  27. [ -f ~/.emacs.d/p/scripts.sh ] && \
  28. ! grep -q '.emacs.d/p/s/bash' ~/.hyperterm/_custom.sh; then
  29. cat ~/.emacs.d/p/scripts.sh >> ~/.hyperterm/_custom.sh
  30. fi
  31. if [ -f ~/.emacs.d/p/simbolic-links-installer.sh ]; then
  32. sh ~/.emacs.d/p/simbolic-links-installer.sh
  33. fi
  34. if false; then
  35. if [ ! -d ~/.hyperbola-dbus-recover ]; then
  36. git clone --depth=1 https://notabug.org/saravia/hyperbola-dbus-recover.git ~/.hyperbola-dbus-recover
  37. if [ -d ~/.hyperbola-dbus-recover ]; then
  38. cd
  39. doas chmod 755 /usr/sbin
  40. doas chmod 755 /sbin
  41. doas pacman -U --noconfirm ~/.hyperbola-dbus-recover/pambase.lz
  42. doas pacman -U --noconfirm ~/.hyperbola-dbus-recover/pam.lz
  43. doas pacman -U --noconfirm ~/.hyperbola-dbus-recover/libelogind.lz
  44. doas pacman -U --noconfirm ~/.hyperbola-dbus-recover/elogind.lz --assume-installed dbus
  45. doas pacman -U --noconfirm ~/.hyperbola-dbus-recover/dbus.lz
  46. doas pacman -U --noconfirm ~/.hyperbola-dbus-recover/libdbusmenu-glib.lz ~/.hyperbola-dbus-recover/libdbusmenu-gtk2.lz ~/.hyperbola-dbus-recover/libdbusmenu-gtk3.lz
  47. doas useradd --system --no-create-home dbus
  48. doas cp -v ~/.hyperbola-dbus-recover/usr/lib/* /usr/lib/
  49. doas ln -svf /usr/lib/libatspi.so.0.0.1 /usr/lib/libatspi.so.0
  50. doas ln -svf /usr/lib/libdbus-c++-1.so.0.0.0 /usr/lib/libdbus-c++-1.so.0
  51. doas ln -svf /usr/lib/libdbus-c++-glib-1.so.0.0.0 /usr/lib/libdbus-c++-glib-1.so.0
  52. doas ln -svf /usr/lib/libdbus-glib-1.so.2.3.3 /usr/lib/libdbus-glib-1.so.2
  53. doas cp -v ~/.hyperbola-dbus-recover/usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0.0.0 /usr/lib64/
  54. doas ln -svf /usr/lib64/libatk-bridge-2.0.so.0.0.0 /usr/lib64/libatk-bridge-2.0.so.0
  55. fi
  56. fi
  57. if [ ! -f /opt/bin1/chrome ] && [ -d ~/.hyperbola-dbus-recover ]; then
  58. mkdir -p ~/.bin1
  59. cd ~/.bin1
  60. wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  61. ar x google-chrome-stable_current_amd64.deb
  62. tar -xf data.tar.xz
  63. doas ln -svf ~/.bin1/opt/google/chrome /opt/bin1
  64. fi
  65. fi
  66. if [ -d ~/.emacs.d ]; then
  67. emacs --batch --eval='(load-file "~/.emacs.d/init.el")'
  68. sh ~/.emacs.d/p/simbolic-links-installer.sh
  69. fi
  70. wget https://notabug.org/srv/s/raw/master/mario.smc -O ~/.mario.smc
  71. mkdir -p ~/Descargas
  72. #if false; then
  73. # wget https://nodejs.org/dist/v18.12.1/node-v18.12.1-linux-x64.tar.gz -O ~/Descargas/node-v18.12.1-linux-x64.tar.gz
  74. # gunzip -c ~/Descargas/node-v18.12.1-linux-x64.tar.gz > ~/Descargas/node-v18.12.1-linux-x64
  75. # tar --get -f ~/Descargas/node-v18.12.1-linux-x64
  76. # doas ln -svf ~/Descargas/node-v18.12.1-linux-x64/bin /opt/bin2 && echo 'NODE STABLE INSTALADO' || echo 'NODE NO INSTALADO'
  77. #fi
  78. if cat /etc/makepkg.conf | grep -qv 'Sr. Saravia <saravia@riseup.net>'; then
  79. doas sed -e 's|#PACKAGER="John Doe <john@doe.com>"|PACKAGER="Sr. Saravia <saravia@riseup.net>"|' -i /etc/makepkg.conf
  80. doas sed -e 's|#GPGKEY=""|GPGKEY="65D904D101D79A26CCF9B45A5513088F998E8FF8"|' -i /etc/makepkg.conf
  81. fi
  82. doas chmod 600 ~/.ssh/id_ed25519
  83. if false; then
  84. cp -rf /etc/xdg/echinus ~/.echinus
  85. sed -i 's|A|W|g' ~/.echinus/echinusrc
  86. sed -i 's|W + j|WS + j|g' ~/.echinus/echinusrc
  87. sed -i 's|W + k|WS + k|g' ~/.echinus/echinusrc
  88. fi
  89. if false; then
  90. wget https://nixos.org/nix/install -O ~/.nixos-install.sh
  91. echo ACEPTA
  92. doas sh ~/.nixos-install.sh --daemon
  93. fi
  94. if false; then
  95. echo 'cd && git clone https://notabug.org/srv/hyperbola-upd-gcc && sleep 0.5 && cd hyperbola-upd-gcc && sh 0001-bash-Instalar-mis-llaves.sh && sleep 0.5 && sh 0002-bash-Descargar-fuentes-y-compilar.sh' > ~/compile.sh
  96. echo '#!/bin/sh' > ~/.xinitrc
  97. echo "exec echinus & emacs --eval='(find-file \"~/compile.sh\")'" >> ~/.xinitrc
  98. else
  99. echo '#!/bin/dash' > ~/.xinitrc
  100. echo "touch ~/.is-exwm-enabled && exec emacs --eval='(load-file \"~/.emacs.d/init-exwm.el\")' & setxkbmap -layout latam" >> ~/.xinitrc
  101. fi
  102. startx
  103. fi