user.dash 4.2 KB

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