#!/bin/bash filelist=`cat tbootstrap/stage0.txt` function install() { for pkgname in $filelist; do rpm --nodeps -i $pkgname/RPMS/x86_64/*.rpm --root=/root/newroot done cd /root/newroot ln -s usr/bin bin ln -s usr/lib lib ln -s usr/lib64 lib64 cd usr/bin ln -s bash sh } function fetch() { for pkgname in $filelist; do mkdir $pkgname git clone git@gitlab.tlnx.ru:rpms/$pkgname.git $pkgname done } function build() { for pkgname in $filelist; do tlnxbuild/tlnxbuild.sh $pkgname done } case $1 in "install") install ;; "fetch") fetch ;; "build") build ;; *) echo Unknown command ;; esac