Girtablulu and I wrote a simple bashscript with these function for packaging

Can you share this one? 🙂

@Harvey why not add a systemd service to start it?

    Harvey For your ssh aliases, you can just add them to .ssh/config. Check out this blog post.

    Sometimes I'll reboot the server my irc bouncer is on and need to start the service again:

    Like what @Justin mentioned, should just use a systemd unit 😃

    # Solus Specific
    alias ap='~/repository/common/Scripts/yauto.py'
    alias ebx='sudo solbuild build pspec.xml -p unstable-x86_64'
    alias reload='source ~/.bashrc'
    alias bashrc='qedit ~/.bashrc'
    alias sr='eopkg sr'
    alias it='sudo eopkg it'
    alias info='eopkg info'
    alias up='sudo eopkg up'
    
    # Directory/File Stuff
    alias ..='cd ..'
    alias l='ls -hl --group-directories-first'
    function mkcd { if [[ -d $1 ]];then cd $1;else mkdir $1;cd $1;fi }

    I have more but they're on my main rig which I am not near currently.

    Justin well get read for some horrible bash scripting 😃

    #!/bin/bash

    usage()
    {
    echo ""
    echo " Syntax: solt [<Order>] [<Argument>]"
    echo ""
    echo " Where <Order> is one of the following orders could be"
    echo ""
    echo " search <Argument> (sr) - Search after eopkg packages with up to 3 search terms"
    echo " info <Argument> (if) - Set information about a eopkg package"
    echo " pkgconf <Argument> (pkg) - Search for package from a pkgconfig()"
    echo " create-repo <Argument> (cr) - Create a new phabricator repo package"
    echo " update-repo <Argument> (ur) - Update phabricator repo package"
    echo " get-repo <Argument> (gr) - Clone phabricator repo package"
    echo " clone-diff <Argument> (cd) - Clone phabricator repo and arc patch a diff"
    echo " newest-source <Argument> (ns) - get the newest source url from a phabricator repo package"
    echo " repo <Argument> - Check if a new package is available or not"
    echo " solbuild-update (sup) - Updates Solbuild"
    echo " clean-local (cl) - Deleted all eopkg files in ../solbuild/local"
    echo " help - Shows this dialog"
    echo ""
    echo " Additional flags: "
    echo ""
    echo " - solbuild-update "
    echo " - co : Updates only the common folders inside the packaging folder"
    echo " - all : Updates Solbuild and common folders"
    echo ""
    echo " - repo"
    echo " - check : Checks the repo list if any mentioned packages have a new update available"
    echo " - add <name> : Adds a repo package to the check list"
    echo ""
    echo " - clone-diff"
    echo " - usage : clone-diff reponame Dxxxx"
    echo ""
    }

    repo=/home/fredu/.solus # where the packaging is
    repo_url=ssh://vcs@dev.getsol.us:2222/source/$2.git
    arg="$1"

    Background color terminal output

    BGC_red='\e[41m'
    BGC_green='\e[42m'
    color_yellow='\e[33m'
    nc='\e[0m\n'

    fileCheck ()
    {
    if [ -z "$1" ]; then
    printf "${BGC_red} Please input package file name. ${nc}"
    exit 1
    elif [ -d "$1" ]; then
    printf "${BGC_red} Directory already exists. ${nc}"
    exit 1
    fi
    }

    rootCheck ()
    {
    if [[ "$EUID" -gt 0 ]]; then
    printf "${BGC_red} ERROR: This operation requires escalated privileges. Exiting! ${nc}"
    exit 1
    fi
    }

    createCommon () {
    git clone https://dev.getsol.us/source/common.git
    ln -sv common/Makefile.common .
    ln -sv common/Makefile.toplevel Makefile
    ln -sv common/Makefile.iso .
    }

    cases

    case "$arg" in
    search | sr)
    shift
    eopkg search "$1" | grep "$2" | grep "$3" | sort
    ;;

    info | if)
        shift
        eopkg info "$1"
    ;;
    
    pkgconf | pkg )
        shift
        python $repo/common/Scripts/epcsearch.py $1
    ;;
    
    create-repo | cr)
        shift 
        cd $repo
        fileCheck $1
        mkdir $1 && cd $1;
        printf "${BGC_green} Please enter package source url: ${nc}"
        read URL
        $repo/common/Scripts/yauto.py ${URL};
        git init;
        echo "include ../Makefile.common" > Makefile;
        printf "${BGC_green} Makefile created ${nc}"
        exec bash
    ;;
    
    update-repo | ur)
        shift
        cd $repo
        fileCheck $1
        git clone $repo_url
        cd $1
        printf "${BGC_green} Please enter new version No: ${nc}"
        read VERSION 
        printf "${BGC_green} Please enter new source url: ${nc}"
        read URL
        /usr/share/ypkg/yupdate.py ${VERSION} ${URL}
        exec bash
    ;;
    
    get-repo | gr)
        shift
        cd $repo
        fileCheck $1
        git clone $repo_url
        cd $1
        exec bash
    ;;
    
    clone-diff | cd)
        shift
        cd $repo
        if [ ! -d "Diff_Clone" ]; then
            mkdir -p $repo/Diff_Clone
            cd  $repo/Diff_Clone
            createCommon
        fi &> /dev/null
        cd $repo/Diff_Clone
        git clone $repo_url
        cd $1
        arc patch $2
        exec bash
    ;;
    
    newest-source | ns)
        shift
        url=$(w3m -dump https://dev.getsol.us/source/$1/browse/master/package.yml | grep 'source :' -A1 | tail -n 1 | awk '{print $2}')
        getnewsource=$(cuppa q $url)
        getrepoinfo=$(eopkg info $1 | grep -m1 "Name" | awk '{print $3,$5}' | sed 's|,| -|; s|,||')
        printf "${color_yellow}Repo version:\e[0m   ${getrepoinfo} ${nc}"
        printf "${color_yellow}Source version:\e[0m ${getnewsource} ${nc}"
    ;;
    
    repo )
        shift
        if [[ $1 == "check" ]]; then
            while IFS= read list; do
            url=$(w3m -dump https://dev.getsol.us/source/$list/browse/master/package.yml | grep 'source :' -A1 | tail -n 1 | awk '{print $2}')
            getnewsource=$(cuppa q $url)
            getrepoinfo=$(eopkg info $list | grep -m1 "Name" | awk '{print $3,$5}' | sed 's|,| -|; s|,||')
                if [ "$(cuppa q $url | awk '{print $1}')" == "$(eopkg info $list | grep -m1 'Name' | awk '{print $5}' | sed 's|,||')" ]; then
                    :
                else
                    echo ""
                    printf "${color_yellow}Repo version:\e[0m   ${getrepoinfo} ${nc}"
                    printf "${color_yellow}Source version:\e[0m ${getnewsource} ${nc}"
                fi
            done < /home/fredu/scripte/Solus/packagelist
    
        elif [[ $1 == "add" ]]; then
            echo $2 >> /home/fredu/scripte/Solus/packagelist
        fi
    ;;
    
    solbuild-update | sup)
        shift
        printf "${color_yellow}Updating... ${nc}"
    
        if [[ $1 == "" ]]; then
            sudo solbuild update > /dev/null 2>&1
            printf "${BGC_green} Solbuild updated ${nc}"
    
        elif [[ $1 == "-co" ]]; then
            for i in $(find $repo -type d -name 'common'); do
                cd "$i/"
                git pull > /dev/null
            done
            printf "${BGC_green} Common folder updated ${nc}"
    
        elif [[ $1 == "-all" ]]; then
            sudo solbuild update > /dev/null 2>&1
            for i in $(find $repo -type d -name 'common'); do
                cd "$i/"
                git pull > /dev/null
            done
            printf "${BGC_green} Solbuild and Common updated ${nc}"
    
        fi
    ;;
    
    clean-local | cl)
        shift
        rootCheck
        find /var/lib/solbuild/local -type f -name '*.eopkg' -delete &
        printf "${BGC_green} Removed *.eopkg in ../solbuild/local ${nc}"
    ;;
    
    help | --help | -h)
        shift
        usage
    ;;
    
    *)
        shift
        usage
    ;;

    esac

      • [deleted]

      alias admedit="VISUAL=gedit sudoedit"

      Bash

      alias ls='ls --color=auto --group-directories-first -v'
      alias df='df -h -x squashfs' # Thanks popey for this one

      .gitconfig

      [url "https://github.com/"]
       insteadOf = "gh:"
      
      [alias]
      graph = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(cyan)(%an)%Creset' --abbrev-commit --date=relative
      grab = "!f() { git clone git@github.com:tryton-vanmeer/$1.git; }; f"

      First time hearing this alias thing.
      Now i have one alias:

      alias ls="lsd"

      Mostly just the following:

      alias gradlew="./gradlew"
      
      alias generatePkg="$HOME/.solus/common/Scripts/yauto.py"
      alias updatePkg="/usr/share/ypkg/yupdate.py"
      alias useUnstable="sudo eopkg ar Solus https://mirrors.rit.edu/solus/packages/unstable/eopkg-index.xml.xz"
      alias useShannon="sudo eopkg ar Solus https://mirrors.rit.edu/solus/packages/shannon/eopkg-index.xml.xz"

      First one is for Gradle so I can call ./gradlew more easily, and the rest are for packaging/checking unstable for an early look at updates 😛

      ~/.bash_aliases
      ## System Aliases ##
      # ================ #
      # Opens up bash_aliases file #
      alias bashAliases="nvim ~/.bash_aliases"
      
      # Fixes dual monitor scaling for 1080p monitor whilst using 4k laptop #
      alias fixAcer="xrandr --output DP2 --scale 2x2"
      
      ## Programming Aliases ##
      # ===================== #
      # Robotics Aliases #
      # ---------------- #
      # Loads programs onto Formula AllCode #
      alias faload="sudo /home/jazzyadmin/Programming/Tools/Faload/./faload"
      
      # Opens up Formula AllCode API cheatsheet #
      alias FACapi="less /home/jazzyadmin/Programming/FACResources/api_functions.md"
      
      # PlantUML Aliases #
      # ---------------- #
      # Executes PlantUML #
      alias pluml="java -jar /home/jazzyadmin/Programming/Tools/PlantUML/plantuml.jar"
      
      
      ## Vim Aliases #
      # ============ #
      # Opens a summary of Vim commands #
      alias vimSummary="less /home/jazzyadmin/Documents/Random_Junk/viSummary"
      
      # Opens up NeoVim config #
      alias nvInit="nvim ~/.config/nvim/init.vim"
      
      
      ## Gaming Aliases ##
      # ================ #
      # DnD Aliases #
      # ----------- #
      # Opens Aelar's journal #
      alias barovianJournal="nvim /home/jazzyadmin/Documents/Media/Games/PnP_RPGs/DnD/Notes/Barovia_Campaign/Barovian_Adventures.tex"
      
      
      ## Uni Aliases ##
      # ============= #
      # Makes a new minutes file #
      alias make_minutes="cp /home/jazzyadmin/Programming/Templates/minutes_template.txt $(date '+%Y-%m-%d')_minutes.txt"
      ~/.bashrc
      ## Directories ##
      # ============= #
      # Uni Directories #
      # --------------- #
      # CS22120 Git Repository Clone #
      export UNI_GIT="/home/jazzyadmin/Programming/GitProjects/Uni_Projects/GP07/GP07"
      
      # Uni Work for Current Year #
      export UNI_WORK="/home/jazzyadmin/Documents/Uni_Stuff/Uni_Work/Year_2"
      
      # CS22120 Work #
      export UNI_WK_SE="/home/jazzyadmin/Documents/Uni_Stuff/Uni_Work/Year_2/Software_Engineering/Group_Project"
      
      # CS22120 Tech Design Spec #
      export DESI_SPEC="/home/jazzyadmin/Documents/Uni_Stuff/Uni_Work/Year_2/Software_Engineering/Group_Project/My_Documents/tech_design_spec"
      
      # Formula AllCode Projects #
      export FAC_PROJECTS="/home/jazzyadmin/Programming/MPLABXProjects"
      
      
      # Gaming Directories #
      # -------------------- #
      export DND_DIR="/home/jazzyadmin/Documents/Media/Games/PnP_RPGs/DnD"
      
      
      # Job Application Directories #
      # ----------------------------- #
      export MY_CV="/home/jazzyadmin/Documents/Professional/Awesome-CV/"
      
      
      # Project Directories #
      # -------------------- #
      export STRING_BOI="/home/jazzyadmin/Programming/RandomProjects/StringManipulator"

      I'm gonna start making more cheatsheets like the one I made for Vim and for my robotics module, cause they are really useful. I think commands that just copy files with an auto-generated name are also just awesome and I'm gonna add more for when I'm writing documentation.

        rav101 alias ipe='curl ipinfo.io/ip'

        great! thanks

        rav101 alias explore='nautilus .'

        If I may suggest: 'nautilus . &'

        JoshStrobl In case my brain derps:
        alias eokpg epkg epokg eopgk...

        🙂
        deep derpd already, hence:

        alias epi='sudo eopkg install'
        alias epr='sudo eopkg remove'
        alias eps='sudo eopkg search'
        alias epupd='sudo eopkg up' #update solar system solus

        JoshStrobl I also have a bunch of goToN...

        Perfect! thanks, I knew there was a better way

        Jazzyboy1 I'm gonna start making more cheatsheets like the one I made for Vim and for my robotics module, cause they are really useful.

        same, I've made some light paper sheets to carry around and stick on the nearest wall. Much faster than switching screen/window focus and there's some kind of neuro-mind-to-hand-and-back-again that increases retainment for me, compared to just copy pasting some lists out on the screen .
        Then mixing it with:
        alias gb='cat .bashrc | grep'

        Some other favs are:

        alias gb='cat ~/.bashrc | grep'
        alias ps='ps axjf'
        alias gps='ps axjf | grep'

        Often taking a man peek with man [program] | grep [word] but don't know how to bash that out easier. Like ctrl+f on a webpage.

        alias vgr='vagrant reload'
        alias vup='vagrant up'...etc.

        alias dk='docker'
        alias dks='docker start'
        alias dkr='docker run...etc'

        Not so much an alias, but for helping the workflow i would recommend trying out fish.
        I've used bash for a long time and basically create aliases for anything i type repeatedly, like everyone else.

        But fish (the friendly interactive shell) really is friendly. It has colors, it tells yo autosuggestions, you can repeat commands or parts of really easily, it makes working on the terminal more enjoyable and faster. The folks from solus have made instructions on how to install it https://getsol.us/articles/configuration/changing-shell/en/ .
        PS: Lots of youtubes out there on how to use it, that's how i bumped into it, and i'm glad to have tried it.

        JoshStrobl I'm too attached to bash since I am without root and stuck on ancient enterprise systems at work (hello, RHEL 5). Sysadmin would never respond to a request to install zsh. I had to fight them just to change my login shell from csh to bash. Such a joy to come home and use Solus lol...