bk.user.bash 4.1 KB

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