# -*- shell-script -*- # Copyright © 2007 - 2021 Steve Youngs All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # What lies here is a collection of handy bash shell functions and # aliases that make life a little easier for pkgusr. B-tips() { less<,,conf Like Meson, CMake path options are relative to prefix unless the value begins with a '/' and then it is absolute. A nice thing about CMake is that it creates targets to edit and rebuild the cache (think: reconfigure). 'ninja edit_cache' and 'ninja rebuld_cache', respectively. Same headache as with Meson... timestamps not being updated on installs. Here is the 'install_commands()' template for CMake builds... ninja install && # CMake builds tend not to update timestamps if [ -f install_manifest.txt ]; then echo>>install_manifest.txt # we need a final newline while read file; do touch -ch "\${file}" done ${pkgbv} ]]; then echo '*****************************************' echo '* *' echo '* B u i l d S c r i p t U p d a t e *' echo '* A v a i l a b l e *' echo '* *' echo '*****************************************' echo ' Your version:' ${pkgbv} echo ' Available Version:' ${sysbv} echo echo 'For a SXEmacs based interactive update, run: "build-update"' echo 'To turn this notice off, set $CHECKUPDATES to: "0"' echo echo -n 'Press [RETURN] to continue...' read junk fi } ## Convenience to allow existing pkgusrs to update their git # config prep_git() { install -vdm755 ${HOME}/.config/git && ln -svf /etc/pkgusr/gitconfig ${HOME}/.config/git/config && # Nuke the old ~/.gitconfig rm -v ${HOME}/.gitconfig 2>/dev/null || true } ## Aliases # Repos/Websites alias srepo='grep --colour Repo_Location:.*$ ${HOME}/.project' alias rawrepo='srepo|cut -d" " -f2|tr -d "<>"' alias trepo='grep --colour Repo_Type:.*$ ${HOME}/.project' alias web='grep --colour Web_Site:.*$ ${HOME}/.project' alias rawweb='web|tr -s " "|cut -d" " -f3|tr -d "<>"' # Logs alias alogs='ls -l ${HOME}/*.{err,log}' alias lerr='ls -l ${HOME}/*.err' alias llog='ls -l ${HOME}/*.log' # Util ## As of 2021-01-18 nano (v5.5) seems FUBAR'd alias ebld='vi ${HOME}/build' alias epro='vi ${HOME}/.project' alias ebp='vi -a ${HOME}/{build,.project}' # alias ebld='nano -w ${HOME}/build' # alias epro='nano -w ${HOME}/.project' # alias ebp='nano -w ${HOME}/{build,.project}' alias deps='grep --colour "Deps: " ${HOME}/.project' alias listp='pinky -l $(whoami)|less' alias patches='find ${SLACKPKG}/**/$(whoami)|grep -E "(diff|patch)"' alias vtar=less alias xtar='tar xf' H-pkg() { less<