Advertisement
Guest User

aros.sh

a guest
Aug 18th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.25 KB | None | 0 0
  1. #!/bin/bash --login
  2. # Begin aros.sh
  3.  
  4. # fkt_dnf_install
  5. fkt_dnf_install() {
  6.     dnf install                 \
  7.                             \
  8.         autoconf                    \
  9.         automake                    \
  10.         bison                   \
  11.         flex                    \
  12.         gcc                     \
  13.         gcc-c++                 \
  14.         genisoimage                 \
  15.         glibc-devel.i386                \
  16.         libpng-devel                \
  17.         libtool                 \
  18.         make                    \
  19.         netpbm                  \
  20.         netpbm-progs                \
  21.         patch                   \
  22.         SDL                     \
  23.         svn
  24. }
  25.  
  26. # fkt_svn_checkout
  27. fkt_svn_checkout() {
  28.     svn co                      \
  29.                             \
  30.         --username=guest                \
  31.         --password=guest                \
  32.                             \
  33.         https://svn.aros.org/svn/aros/trunk     \
  34.                             \
  35.         AROS
  36. }
  37.  
  38. # fkt_patch_grub2
  39. fkt_patch_grub2() {
  40.     wget -c https://pastebin.com/raw/9Ws99C9y   \
  41.          -O ~/AROS/AROS/arch/all-pc/boot/aros1.patch
  42.  
  43.     pushd ~/AROS/AROS/arch/all-pc/boot
  44.     patch -N -p0 < aros1.patch
  45.     popd
  46. }
  47.  
  48. # fkt_patch_glibc
  49. fkt_patch_glibc() {
  50.     mkdir -p ~/AROS/AROS/bin/pc-i386/gen/lib
  51.     cp /usr/lib/libc_nonshared.a ~/AROS/AROS/bin/pc-i386/gen/lib/libc.a
  52. }
  53.  
  54. # fkt_configure_32bit
  55. fkt_configure_32bit() {
  56.     cd ~/AROS/AROS
  57.     ./configure --target=pc-i386
  58. }
  59.  
  60. # fkt_configure_64bit
  61. fkt_configure_64bit() {
  62.     cd ~/AROS/AROS
  63.     ./configure --target=pc-x86_64
  64. }
  65.  
  66. # fkt_make
  67. fkt_make() {
  68.     cd ~/AROS/AROS
  69.     make
  70. }
  71.  
  72. # fkt_make_distfile
  73. fkt_make_distfile() {
  74.     cd ~/AROS/AROS
  75.     make distfiles
  76. }
  77.  
  78. case "${1}" in
  79.     -a)
  80.         fkt_dnf_install
  81.         fkt_svn_checkout
  82.         fkt_patch_grub2
  83.         fkt_patch_glibc
  84.         fkt_configure_32bit
  85.         fkt_make
  86.         fkt_make_distfile
  87.         ;;
  88.     -b)
  89.         fkt_dnf_install
  90.         fkt_svn_checkout
  91.         fkt_patch_grub2
  92.         fkt_configure_64bit
  93.         fkt_make
  94.         fkt_make_distfile
  95.         ;;
  96.     -i)
  97.         fkt_dnf_install
  98.         ;;
  99.     -s)
  100.         fkt_svn_checkout
  101.         ;;
  102.     -g)
  103.         fkt_patch_grub2
  104.         ;;
  105.     -c)
  106.         fkt_patch_glibc
  107.         ;;
  108.     -m)
  109.         fkt_make
  110.         ;;
  111.     -d)
  112.         fkt_make_distfile
  113.         ;;
  114.     *)
  115.         echo -e "---[ Menu ]--------------------"
  116.         echo -e "-a) :... do everything (32 bit)"
  117.         echo -e "-b) :... do everything (64 bit)"
  118.         echo -e "---[ Tasks ]-------------------"
  119.         echo -e "-i) :......... dnf install deps"
  120.         echo -e "-s) :........ svn checkout aros"
  121.         echo -e "-g) :.............. patch grub2"
  122.         echo -e "-c) :.............. patch glibc"
  123.         echo -e "-m) :.............. make (aros)"
  124.         echo -e "-d) :..... make distfile (aros)"
  125.         ;;
  126. esac
  127.  
  128. exit
  129. # End aros.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement