LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-05-2018, 02:49 PM   #1
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,529
Blog Entries: 3

Rep: Reputation: 440Reputation: 440Reputation: 440Reputation: 440Reputation: 440
Little script I have used for a long time alienb-get.sh


This script I have been using for a while to Keep some of Eric's way cool prebuilt programs I like to use. Add to it or play with it.
Code:
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi

while true; do

# Ask the user for the Program name
echo -e "\e[1;33m what Alian Bob program do you need?\e[0m"
read prgname
echo -e "\e[1;34m It's ok lets download or install $prgname \e[0m"
sleep 2
PROGNM=$prgname 


# Need the version of Slackware you are running
echo -e "\e[1;33m Enter the version number of Slackware you need to download ? \e[0m"
read slackwareversion
echo -e "\e[1;34m You chose slackware version $slackwareversion \e[0m"
sleep 2
SLKVER=$slackwareversion



# Need the version of Slackware you are downloading
echo -e "\e[1;33m Type yes or no to install? \e[0m"
read install
echo -e "\e[1;33m Are going to install $install \e[0m"
sleep 2
INST=$install




EDITPG=vim # add you favorite editor here defaylt is vim kwrite,kate,gvim,geany.

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi



CWD=$(pwd)
TMP=${TMP:-/tmp/SBo/$SLKVER}
BOB=$TMP/$PROGNM

if [ "$ARCH" = "x86_64" ]; then
PKG="pkg64"
else
PKG="pkg"
fi

#rm -rf $BOB
mkdir -p $TMP/$PROGNM
echo going to grab slackware.uk/people/alien/slackbuilds/$PROGNM/$PKG/$SLKVER/
 sleep 5 #http://slackware.uk/people/alien/slackbuilds/
rsync -r -a -v  --delete --progress --stats rsync://slackware.uk/people/alien/slackbuilds/$PROGNM/$PKG/$SLKVER/  $TMP/$PROGNM


cd $TMP

SLKGCC="$(gcc --version | grep gcc)"



if [ "$SLKGCC" = "gcc (GCC) 4.7.1" ]; then
  SLKUSYS="14.0"
elif [ "$SLKGCC" = "gcc (GCC) 4.8.2" ]; then
  SLKUSED="14.1"
elif [ "$SLKGCC" = "gcc (GCC) 5.5.0" ]; then
  SLKUSYS="14.2"
else
  SLKUSYS="current"
fi

sleep 5
if [ "$SLKVER" = "$SLKUSYS" ]; then
   echo -e "\e[1;34m Your Installing the right program for your system \e[0m"
   sleep 3
elif [ "$INST" = "no" ]; then
   echo -e "\e[1;34m it is downloaded do not install on this system  \e[0m"
else
   echo -e '\E[37;41m'"\033[1m !!!!Unable TO Istall You are running the wrong Slackware Version !!!!\033[0m"
   sleep 5
   exit 1
fi






if [ -f   $TMP/$PROGNM/*.txz ]; then
  echo -e "\e[1;33m $PROGNM downloaded \e[0m"
  sleep 1
else
function pause(){
   read -p "$*"
}
 
# ...
  echo -e "\e[1;33m Program  Not found. Was It Spelled Right? \e[0m"
  echo -e "\e[1;33m  Would you like to look it up? press enter to see the repo \e[0m"
pause 'Press [Enter] key to continue or ctrl c to stop...'
# ...
lynx  http://slackware.uk/people/alien/slackbuilds/

fi

if [ -f  $TMP/$PROGNM/*.dep ]; then
   echo -e "\e[1;33m This Program Has Dependencies exit vim press shit>colon then type q  \e[0m"
   echo -e "\e[1;33m or a gui editor gvim kwrite  \e[0m"
    sleep 5
     $EDITPG  $TMP/$PROGNM/*.dep 
     
function pause(){
   read -p "$*"
}

# ...
   echo -e "\e[1;33m Look at them good you may need them. \e[0m"
pause 'Press [Enter] key to continue or ctrl c to stop...'
# ...
else
    echo -e "\e[1;33m No dependencies needed \e[0m"
    sleep 3
fi

if [ "$INST" = "yes" ]; then
    cd  $BOB
    upgradepkg --reinstall --install-new *.t?z
else
    echo -e "\e[1;33m your program is locate $BOB \e[0m"
    sleep 3
    
fi






function pause(){
   read -p "$*"
}
 
# ...
   echo -e "\e[1;33m Would you like to install or download another alien pkg \e[0m"
pause 'Press [Enter] key to continue or ctrl c to stop...'
# ...
# rest of the script
#

    for i in {Type In another Program}; do
        echo -e "\e[1;34m $i\e[0m"
        sleep 1
    done
done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php script sometimes takes a long time to execute tony873004 Linux - Server 1 10-17-2017 07:47 PM
Long time member, long time *nix user, about time to say hi. stuman LinuxQuestions.org Member Intro 0 10-15-2013 08:35 AM
script taking long time to execute smritisingh03 Linux - Newbie 6 01-25-2011 12:08 PM
Startup script access right error --- rc.local (freeze for long time) fhleung Debian 1 07-31-2007 12:35 AM
Firefox - Script takes a long time to go away Irving Linux - Software 1 05-05-2004 10:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration