Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14
Like Tree11Likes
cool tx I'll try thank you very much for your help Edit : your code is good but a little problem 1 but file are bash file (. sh) 2 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Aug 2013
    Posts
    15

    cool tx I'll try thank you very much for your help
    Edit :
    your code is good but a little problem

    1 but file are bash file (. sh)
    2 must download the script and must assign permission

    tx
    Last edited by narugawa; 08-13-2013 at 12:28 AM.

  2. #12
    Just Joined! kerim's Avatar
    Join Date
    May 2010
    Location
    Istanbul
    Posts
    15

    Cool Thanks for my solution

    not at all

  3. #13
    Just Joined!
    Join Date
    Aug 2013
    Posts
    15
    it works!! tx tx tx !!!!

    Code:
    #!/bin/bash
    
    DISTRIBUTOR=$(lsb_release -i | tr '[:upper:]' '[:lower:]' | cut -f 2)
    
    echo "Your OS is : $DISTRIBUTOR"
    echo "Now you os will install to your drive"
    echo "Please be patient"
    sleep 5
    
    case $DISTRIBUTOR in
    
    ubuntu)
            echo "Installing my package"
            dpkg -i mypackage.deb
            ;;
    debian)
            echo "Installing my package"
            wget files
            bash  setupwithssl.sh
    
            ;;
    fedora)
            echo "Installing my package"
            wget files
            bash  setupwithssl.sh
            ;;
    centos)
            echo "Installing my package"
            wget files
            bash  setupwithssl.sh
            ;;
    esac
    Last edited by narugawa; 08-13-2013 at 01:02 AM.
    kerim likes this.

  4. #14
    Linux Newbie
    Join Date
    Nov 2012
    Posts
    211
    hi,

    little improvements :
    Code:
    Distro=$(lsb_release --id --short)
    shopt -s nocasematch
    #...
    case $Distro in
    etc.
    narugawa and kerim like this.

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •