diff --git a/PKGBUILD b/PKGBUILD index 51aecb8..6df1039 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,21 +1,31 @@ -# Maintainer: Georg Wagner (@puxplaying) +# Maintainer: Georg Wagner pkgname=autogit -pkgver=1.7.3 -pkgrel=1 +pkgver=1.9.0 +pkgrel=2 pkgdesc="Auto build, update, install PKGBUILDS from Github, Gitlab and AUR" arch=('any') url="https://github.com/puxplaying/autogit" -license=('GPL3') -depends=('pacman' 'sudo' 'bash' 'curl' 'fzf') -makedepends=('git') -optdepends=('manjaro-tools-pkg: Needed for Manjaro clean chroot package building' - 'manjaro-chrootbuild: Needed for Manjaro clean chroot package building') +license=('GPL-3.0-or-later') +depends=( + pacman + sudo + bash + curl + fzf +) +makedepends=( + git +) +optdepends=( + 'manjaro-chrootbuild: Needed for Manjaro clean chroot package building' + 'devtools: Needed for Arch Linux clean chroot package building' +) +backup=("etc/$pkgname/$pkgname.conf") source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz") -sha256sums=('4d26d4535b132a733e2f785cd641fc28a605005219f437cc3b16241822afc623') +sha256sums=('c5bd919507944703d3aa7ea75719dde43026da0a6de8fae6661c4488229ddd88') package () { - backup=(etc/autogit/autogit.conf) cd "$pkgname-$pkgver" install -Dm755 "$pkgname" -t "$pkgdir/usr/bin/" install -Dm644 "$pkgname.conf" -t "$pkgdir/etc/$pkgname/" diff --git a/README.md b/README.md index a03221b..690e44e 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,73 @@ # autogit -Autogit is a Bash tool to automatically build, update or install Pacman applications from PKGBUILD's available on Github, Gitlab and AUR via configurable `makepkg`, Manjaro `buildpkg` or `chrootbuild` commands. It can also create automatically repo names like *core*, *extra*, *community* and create/update a repo database file via `repo-add`. Additionally it clears each local repo with `paccache -v -r -k 1 -c` to only keep the latest package version. +Autogit is a Bash tool to automatically build, update or install Pacman applications from PKGBUILD's available on Github, Gitlab and AUR via configurable `makepkg`, [`devtools`](https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot#Convenience_way), or Manjaro `chrootbuild` commands. It can also create automatically repo names like *core*, *extra*, *community* and create/update a repo database file via `repo-add`. Additionally it clears each local repo with `paccache` to only keep the latest package version. -2 different options are available to compare and update applications. In case of a "-git" package it checks for the latest commit to update and can either run once or in a loop with a timer setting. +Basically if you want to avoid a "git clone" and the rest of the procedure each time a PKGBUILD has been updated and trust the source, then this tool might be for you. Here are some examples: +- Auto create your own local repositories, add them to `/etc/pacman.conf` and update with Pacman. +- Compile packages from different sources into one repository while building all in a clean "chroot", e.g. AUR, Gitlab, Github. +- Compile the same package from different branches into different repositories, or add a "-git" PKGBUILD for development on a different branch etc. +- Use "makepkg" to directly install packages after compilation. -More information on how to set it up is available in autogit.conf, examples are included. +Two different options are available to compare and update applications. In case of a "-git" package it checks for the latest commit to update and can either run once or in a loop with a timer setting. + +More information on how to set it up is available in [autogit.conf](https://github.com/puxplaying/autogit/blob/master/autogit.conf), examples are included. Currently the AUR, 6 Github and 6 Gitlab sources are available to use. There is no limitation of packages for each source, which need to be added to the *reponames* folder source files. In sum 13 different repos can be enabled/created and will be updated together. +--- + How to install: +This package is available on [Manjaro](https://packages.manjaro.org/?query=autogit) and the [AUR](https://aur.archlinux.org/packages/autogit). + +From source: + - `sudo pacman -Syu base-devel git` - `git clone https://github.com/puxplaying/autogit.git ` - `cd autogit` - `makepkg -srci` +--- + How to run: -- `autogit` -- `autogit -h` +- Run `autogit` after installation to create a local configuration +- `autogit -h` (Help Page and fzf-UI options to manage packages) + + ``` + Welcome to Autogit's Help Page! + + Autogit runs by default without flags. + In order to run autogit, edit the options in + "/YourDirectory/autogit/autogit.conf" + + The provided flags will run a fzf UI to manage packages. + + autogit [options]: + + -e, --edit - [EDIT] + Edit Package List Entries (Commenting With '#' Is Supported) + NOTE: Make Sure That The (EDITOR) Environment Variable Is Set On Your System! + + -d, --dryrun - [DRY RUN] + Dry Run To Remove Packages - (Nothing Will Be Touched) + + -b, --build - [REBUILD PACKAGES] + Remove Package Source(s), Binary(s) And Rebuild The Packge(s) + + -r, --remove - [REMOVE PACKAGES] + Remove Package Source(s), Binary(s), Package List Entry(s), + Old Database Files And Run "repo-add" If Enabled + + -h, --help - This Help Text + ``` + +To run it automatically without a password prompt for `chrootbuild`, it can be added to `sudoers` via: -To run it automatically without a password prompt for `buildpkg`, it can be added to `sudoers` via: +`echo "$USER ALL = NOPASSWD: /usr/bin/chrootbuild" | sudo tee /etc/sudoers.d/$USER` -`echo "$USER ALL = NOPASSWD: /usr/bin/buildpkg" | sudo tee /etc/sudoers.d/$USER` +--- ![123](https://user-images.githubusercontent.com/28549766/103438530-0b81d300-4c34-11eb-9ea1-a49542fabc4f.png) diff --git a/autogit b/autogit old mode 100644 new mode 100755 index d6b4716..47383c1 --- a/autogit +++ b/autogit @@ -3,46 +3,77 @@ # Set autogit directory DIR=$HOME/autogit # +# Set cache directory and create it +CACHEDIR=/tmp/autogit +if [ -e "$DIR" ]; then + mkdir -p "$CACHEDIR" +fi +# +# Configuration file update check +function conf_ver_upd() { + # Check if the local ".conf" needs to be merged with the new package ".conf" + # because code changes require it. + # Define a hard coded variable, which will be checked inside the ".conf file" + if [ "$CONFVER" == "1.8.5" ]; then + echo "Up to date configuration" &>/dev/null + else + clear + echo "" + echo -e " \e[1mPackage Update - manual intervention required!\e[0m" + echo -e " \e[1mPlease merge the changes of \e[7m/etc/autogit/autogit.conf\e[0m \e[1mfor usage!\e[0m" + echo "" + exit 1 + fi +} +# # Check if a local configuration exists if [ -e "$DIR" ]; then # If local autogit folder exists - if [ -e "$DIR/autogit.conf" ]; then # If local autogit.conf file exists + if [ -e "$DIR/autogit.conf" ]; then # If local autogit.conf file exists in "$DIR" # Load User configuration # This is the default behavior to quickly change all settings without the need of root access, - # but can be changed by deleting the ".conf" in "$DIR", to use the root file instead. + # but can be changed by deleting the ".conf" in "$DIR" and "$HOME/.config/autogit", to use the root file instead. configdir=$DIR - . $configdir/autogit.conf + . "$configdir"/autogit.conf + + # Configuration file update check + conf_ver_upd + else + if [ -e "$HOME/.config/autogit/autogit.conf" ]; then # If local autogit.conf file exists in "$HOME/.config/autogit" + + # Load User configuration + # This is the default behavior to quickly change all settings without the need of root access, + # but can be changed by deleting the ".conf" in "$DIR" and "$HOME/.config/autogit", to use the root file instead. + configdir=$HOME/.config/autogit + . "$configdir"/autogit.conf - # Check if the local ".conf" needs to be merged with the new package ".conf" - # because code changes require it. - # Define a hard coded variable, which will be checked inside the ".conf file" - if [ "$CONFVER" == "1.7.3" ]; then - echo "Up to date configuration" &>/dev/null + # Configuration file update check + conf_ver_upd else - clear - echo "" - echo -e " \e[1mPackage Update - manual intervention required!\e[0m" - echo -e " \e[1mPlease merge the changes of \e[7m/etc/autogit/autogit.conf\e[0m \e[1mfor usage!\e[0m" - echo "" - exit 1 + # If a local "autogit.conf" file does not exist, but the autogit folder is present in "$DIR", + # we need to assume the user wants to use the root configuration file instead. + # This means a new configuration file can be detected via a ".pacnew" file and + # should not require a message on changes, as this is user preference. + # Load root configuration + configdir=/etc/autogit + . $configdir/autogit.conf fi - else - # If a local "autogit.conf" file does not exist, but the autogit folder is present in "$DIR", - # we need to assume the user wants to use the root configuration file instead. - # This means a new configuration file can be detected via a ".pacnew" file and - # should not require a message on changes, as this is user preference. - # Load root configuration - configdir=/etc/autogit - . $configdir/autogit.conf fi else # Create a local configuration on first run or if "$DIR" is not found if [ -e "/etc/autogit" ]; then - mkdir -p "$DIR" && cp -r /etc/autogit/* "$DIR" - newconfig=1 + if mkdir -p "$DIR" && cp -r /etc/autogit/reponames "$DIR" && cp -r /etc/autogit "$HOME/.config" && ln -s "$HOME/.config/autogit/autogit.conf" "$DIR"; then + newconfig=1 + fi fi fi # +# Traps (ctrl-c) +function killproc() { + echo -e "\n**** Received SIGINT, aborting! ****\n" + kill -- -$$ && exit 2 +} +# # Messages GITHUBMSG="\e[1mGithub repo updated - \e[7m$GITHUBBINARY\e[0m\e[0m" GITHUBMSGCUST="\e[1mGithub repo updated - \e[7m$GITHUBBINARYCUSTOM\e[0m\e[0m" @@ -59,28 +90,158 @@ GITLABMSGCUST5="\e[1mGitlab repo updated - \e[7m$GITLABBINARYCUSTOM5\e[0m\e[0m" AURMSG="\e[1mAUR repo updated - \e[7m$AURBINARY\e[0m\e[0m" FAILEDBUILDMSG="\e[31mPackage build failed, removing ...\e[0m" # +# Online connection check +function onlinecheck() { + # Check for a internet connection + if [ -z "$(curl -f -s "$GITHUBURL")" ]; then # Check if "curl" fails + echo "No online connection ..retrying" + sleep 2 + if [ -z "$(curl -f -s "$GITHUBURL")" ]; then # Check if "curl" fails + echo "No online connection ..retrying" + sleep 2 + if [ -z "$(curl -f -s "$GITHUBURL")" ]; then # Check if "curl" fails + echo "No online connection ..exit!" + exit 1 + fi + fi + fi +} +# +# Supported build options +function buildoptions() { + + failedbuild=0 + + if [ "$var" == "3" ]; then + # Arch "devtools" - Convenience way option + if $MBARG1 "$MBARG2" "$MBARG3" "$MBARG4"; then + rm -rf ./*.*.log* ./*.log &>/dev/null # remove log files + mv ./*.*.pkg.* "$DIR/$GITHUBBINARY" &>/dev/null # move built package + rm -rf ./*.*.tar.* ./*.zip ./*.deb &>/dev/null # remove left over source packages + find "$DIR/$GITHUBBINARY" -type d -exec paccache -v -r -k 1 -c {} \; # clean cache + setrepoadd=1 + else + echo -e "$FAILEDBUILDMSG" + rm -rf PKGBUILD &>/dev/null + failedbuild=1 + fi + else + if [ "$var" == "1" ]; then + # Makepkg building + if makepkg "$MARG1" "$MARG2" "$MARG3" "$MARG4" "$MARG5" "$MARG6"; then + mv ./*.*.pkg.* "$DIR/$GITHUBBINARY" &>/dev/null + rm -rf ./*.*.tar.* ./*.zip ./*.deb &>/dev/null + find "$DIR/$GITHUBBINARY" -type d -exec paccache -v -r -k 1 -c {} \; # clean cache + setrepoadd=1 + else + echo -e "$FAILEDBUILDMSG" + rm -rf PKGBUILD &>/dev/null + failedbuild=1 + fi + else + if [ "$var" == "0" ]; then + # Makepkg installation + if makepkg -srci --noconfirm; then + echo "installed ..." + else + echo -e "$FAILEDBUILDMSG" + rm -rf PKGBUILD &>/dev/null + failedbuild=1 + fi + else + if [ "$var" == "2" ]; then + # Manjaro chrootbuild + # I don't know why, but "chrootbuild" is unable to ignore "unset/empty" variables + # So let's filter them out in a loop + + # Source folder + folder="$(printf '%q\n' "${PWD##*/}")" + + # "chrootbuild" doesn't like to be inside the "git" directory, but instead wants to be pointed at it + cd .. + + # Define an array with variable names + variables=("MCARG1" "MCARG2" "MCARG3" "MCARG4" "MCARG5" "MCARG6") + + # Initialize a command string + cmd="" + + # Loop through the "variables" array and append each set variable to the "cmd" command + for vars in "${variables[@]}"; do + if [ -n "$vars" ]; then + cmd+="\${$vars} " + fi + done + + # Resolve the "cmd" command string via the eval function + ARGUMENTS="$(eval echo "${cmd}")" + BUILDFLAGS="$(printf "%s\n" "$ARGUMENTS")" + BUILDCOMMAND="sudo chrootbuild $BUILDFLAGS $folder" + echo "Buildcommand = \"$BUILDCOMMAND\"" + + if $BUILDCOMMAND; then + mv ./*.*.pkg.* "$DIR/$GITHUBBINARY" &>/dev/null + cd "$folder" || exit + rm -rf ./*.*.log* ./*.log &>/dev/null + rm -rf ./*.*.tar.* ./*.zip ./*.deb &>/dev/null + find "$DIR/$GITHUBBINARY" -type d -exec paccache -v -r -k 1 -c {} \; # clean cache + setrepoadd=1 + else + echo -e "$FAILEDBUILDMSG" + rm -rf "$folder"/PKGBUILD &>/dev/null + failedbuild=1 + fi + fi + fi + fi + fi +} +# +# Find "-git" package source +function gitpkg_src_check() { + gitpkgname="$(cat .SRCINFO | grep 'source =' | awk -F"/" '{print $NF}' | cut -f1 -d".")" # Try if upstream pkg name is in "source =" + gitpkgname1="$(cat .SRCINFO | grep 'pkgname =' | cut -c 11-)" # Try if upstream pkg name is in "pkgname =" + gitpkgname2="$(cat .SRCINFO | grep 'url =' | awk -F"/" '{print $NF}')" # Try if upstream pkg name is in "url =" + gitpkgname3="$(cat "$gitfile" | cut -c1-5)" # Cut the first 5 letters of the "-git" package name + if [ -e "$gitpkgname" ]; then + if [[ -n "$gitpkgname" ]]; then + cd "$gitpkgname" || exit + fi + else + if [ -e "$gitpkgname1" ]; then + if [[ -n "$gitpkgname1" ]]; then + cd "$gitpkgname1" || exit + fi + else + if [ -e "$gitpkgname2" ]; then + if [[ -n "$gitpkgname2" ]]; then + cd "$gitpkgname2" || exit + fi + else + ls | grep "$gitpkgname3" | tee .gitsrc &>/dev/null # Create a list of all matching files for the first 5 letters of the "pkgname" via "ls" + cat .gitsrc | while read line || [[ -n $line ]]; do # Try to find the upstream source folder by checking the matching names while looping through a file. + if [ -d "$line" ]; then # Check if one of the matching names of the "while loop" is a folder + # echo "Directory "$line" exists." + echo "$line" | tee .srcf &>/dev/null + fi + done + rm -rf .gitsrc &>/dev/null + GITPKGSRC="$(cat .srcf)" + cd "$GITPKGSRC" || exit + rm -rf .gitsrc &>/dev/null + fi + fi + fi +} +# # Main functionality function maincheck() { if [ -e "$DIR/packages/$GITDIR/$p" ]; then # If file exists - cd "$DIR/packages/$GITDIR/$p" # go to current package directory to compare it + cd "$DIR/packages/$GITDIR/$p" || exit # go to current package directory to compare it ONLINEPKGBUILD=".onlinepkgbuild" CURL=$(curl -f -s "$GITHUBURL" | tee "$ONLINEPKGBUILD") - - # Check for a internet connection - if ! [[ -n "$CURL" ]] && [ -s "$ONLINEPKGBUILD" ]; then # Check if CURL fails and file is empty - echo "No online connection ..retrying" - sleep 2 - if ! [[ -n "$CURL" ]] && [ -s "$ONLINEPKGBUILD" ]; then # Check if CURL fails and file is empty - echo "No online connection ..retrying" - sleep 2 - if ! [[ -n "$CURL" ]] && [ -s "$ONLINEPKGBUILD" ]; then # Check if CURL fails and file is empty - echo "No online connection ..exit!" - rm -rf "$ONLINEPKGBUILD" &>/dev/null - exit 1 - fi - fi - fi + onlinecheck # Update check method 1: compare "pkgver" + "pkgrel" & "sha512sum of PKGBUILD's via curl" if [ "$UPDCHECK" == "1" ]; then @@ -111,21 +272,21 @@ function maincheck() { # Online PKGBUILD ".SRCINFO" if [ -e "$ONLINESRCDIR" ]; then # If file exists - cd "$ONLINESRCDIR/original" + cd "$ONLINESRCDIR/original" || exit git fetch origin &>/dev/null - git checkout origin/$BRANCH &>/dev/null - git reset --hard origin/$BRANCH &>/dev/null # reset files to how they were before + git checkout origin/"$BRANCH" &>/dev/null + git reset --hard origin/"$BRANCH" &>/dev/null # reset files to how they were before git clean -f -d &>/dev/null # clear any other changes you've done makepkg --printsrcinfo >"$DIR/packages/$GITDIR/$p"/"$ONLINESRCDIR"/.SRCINFO # print .SRCINFO file for a reliable online pkg update reference - cd "$DIR/packages/$GITDIR/$p" # go to current package directory + cd "$DIR/packages/$GITDIR/$p" || exit # go to current package directory else if mkdir -p "$ONLINESRCDIR" && cd "$ONLINESRCDIR"; then git clone --single-branch --branch "$BRANCH" "$GITHUBCLONEURL""$p".git &>/dev/null folder="$(ls)" - mv $folder original &>/dev/null - cd original + mv "$folder" original &>/dev/null + cd original || exit makepkg --printsrcinfo >"$DIR/packages/$GITDIR/$p"/"$ONLINESRCDIR"/.SRCINFO # print .SRCINFO file for a reliable online pkg update reference - cd "$DIR/packages/$GITDIR/$p" # go to current package directory + cd "$DIR/packages/$GITDIR/$p" || exit # go to current package directory fi fi @@ -145,41 +306,9 @@ function maincheck() { gitfile=.gitcheck if [ -e "PKGBUILD" ]; then # If file exists if [ -e "$gitfile" ]; then - if grep -E *'-git' "$gitfile" &>/dev/null; then # If result matches (Name has a -git string) - gitpkgname="$(cat .SRCINFO | grep 'source =' | awk -F"/" '{print $NF}' | cut -f1 -d".")" # Try if upstream pkg name is in "source =" - gitpkgname1="$(cat .SRCINFO | grep 'pkgname =' | cut -c 11-)" # Try if upstream pkg name is in "pkgname =" - gitpkgname2="$(cat .SRCINFO | grep 'url =' | awk -F"/" '{print $NF}')" # Try if upstream pkg name is in "url =" - gitpkgname3="$(cat "$gitfile" | cut -c1-5)" # Cut the first 5 letters of the "-git" package name - if [ -e "$gitpkgname" ]; then - if [[ -n "$gitpkgname" ]]; then - cd "$gitpkgname" - fi - else - if [ -e "$gitpkgname1" ]; then - if [[ -n "$gitpkgname1" ]]; then - cd "$gitpkgname1" - fi - else - if [ -e "$gitpkgname2" ]; then - if [[ -n "$gitpkgname2" ]]; then - cd "$gitpkgname2" - fi - else - ls | grep "$gitpkgname3" | tee .gitsrc &>/dev/null # Create a list of all matching files for the first 5 letters of the "pkgname" via "ls" - cat .gitsrc | while read line || [[ -n $line ]]; do # Try to find the upstream source folder by checking the matching names while looping through a file. - if [ -d "$line" ]; then # Check if one of the matching names of the "while loop" is a folder - # echo "Directory "$line" exists." - echo "$line" | tee .srcf &>/dev/null - fi - done - rm -rf .gitsrc &>/dev/null - GITPKGSRC="$(cat .srcf)" - cd "$GITPKGSRC" - rm -rf .gitsrc - fi - fi - fi - + if grep -E *'-git' "$gitfile" &>/dev/null; then # If result matches (Name has a -git string) + # Find "-git" package source + gitpkg_src_check # Check if a gitlog has been created if [ -f ".gitversioncheck" ]; then # If file exists git fetch origin &>/dev/null @@ -187,8 +316,8 @@ function maincheck() { gitversioncheck1="$(git show | head -1 | tee "$gitversionfile1")" if [[ -n "$gitversioncheck1" ]]; then if [[ "$(cat "$gitversionfile1")" == "$(cat ".gitversioncheck")" ]]; then - cd "$DIR/packages/$GITDIR/$p" - echo -e "\e[2m🗹 Up-to-Date [Git-Version]\e[0m" + cd "$DIR/packages/$GITDIR/$p" || exit + echo -e "\e[2m🗹 Up-to-Date\e[0m" rm -rf .onlinepkgbuild &>/dev/null return 1 fi @@ -199,17 +328,17 @@ function maincheck() { gitversioncheck="$(git show | head -1 | tee "$gitversionfile")" # Generate a gitcheck file for a update reference if [[ -n "$gitversioncheck" ]]; then - cd "$DIR/packages/$GITDIR/$p" - echo -e "\e[2m🗹 Up-to-Date [Git-Version]\e[0m" + cd "$DIR/packages/$GITDIR/$p" || exit + echo -e "\e[2m🗹 Up-to-Date\e[0m" rm -rf .onlinepkgbuild &>/dev/null return 1 fi fi - cd .. fi fi fi + # Check which update method is selected if [ "$UPDCHECK" == "2" ] && [ -e "PKGBUILD" ] && [ "$GETPKGVER" == "$LOCALPKGVER" ] && [ "$GETPKGREL" == "$LOCALPKGREL" ] && [ "$SHA512LOCAL" == "$SHA512ONLINE" ]; then # If PKGBUILD exists, "pkgver" + "pkgrel" and SHA-512 sums match echo -e "\e[2m🗹 Up-to-Date\e[0m" rm -rf "$ONLINEPKGBUILD" &>/dev/null @@ -217,126 +346,32 @@ function maincheck() { echo -e "\e[2m🗹 Up-to-Date\e[0m" rm -rf "$ONLINEPKGBUILD" &>/dev/null else + echo -e "\e[7mOut-of-Date! Updating ...\e[0m" + cd "$DIR/packages/$GITDIR/$p" || exit + + onlinecheck git fetch origin &>/dev/null - git checkout origin/$BRANCH &>/dev/null - git reset --hard origin/$BRANCH # reset files to how they were before - git clean -f -d # clear any other changes you've done - if [ "$var" == "1" ]; then - ls - folder="$(printf '%q\n' "${PWD##*/}")" - cd .. - if buildpkg -c -a multilib -p $folder; then - mv /var/cache/manjaro-tools/pkg/stable/x86_64/*.*.tar.* "$DIR/$GITHUBBINARY" &>/dev/null - find "$DIR/$GITHUBBINARY" -type d -exec paccache -v -r -k 1 -c {} \; # clean cache - setrepoadd=1 - else - echo -e "$FAILEDBUILDMSG" - rm -rf $folder/PKGBUILD - failedbuild=1 - fi - else - if [ "$var" == "0" ]; then - if time makepkg $MARG1 $MARG2 $MARG3 $MARG4 $MARG5 $MARG6; then - mv *.*.tar.* "$DIR/$GITHUBBINARY" &>/dev/null - find "$DIR/$GITHUBBINARY" -type d -exec paccache -v -r -k 1 -c {} \; # clean cache - setrepoadd=1 - else - echo -e "$FAILEDBUILDMSG" - rm -rf PKGBUILD - failedbuild=1 - fi - else - if [ "$var" == "2" ]; then - if time makepkg -srci --noconfirm; then - echo "installed ..." - else - echo -e "$FAILEDBUILDMSG" - rm -rf PKGBUILD - failedbuild=1 - fi - else - if [ "$var" == "3" ]; then - ls - folder="$(printf '%q\n' "${PWD##*/}")" - cd .. - if buildpkg $ARG1 $ARG2 $ARG3 $ARG4 $ARG5 $ARG6 $folder; then - mv /var/cache/manjaro-tools/pkg/$ARG2/$ARG5/*.*.tar.* "$DIR/$GITHUBBINARY" &>/dev/null - find "$DIR/$GITHUBBINARY" -type d -exec paccache -v -r -k 1 -c {} \; # clean cache - setrepoadd=1 - else - echo -e "$FAILEDBUILDMSG" - rm -rf $folder/PKGBUILD - failedbuild=1 - fi - else - if [ "$var" == "4" ]; then - ls - folder="$(printf '%q\n' "${PWD##*/}")" - cd .. - if sudo chrootbuild $MCARG1 $MCARG2 $MCARG3 $MCARG4 $MCARG5 $MCARG6 $folder; then - mv *.*.tar.* "$DIR/$GITHUBBINARY" &>/dev/null - find "$DIR/$GITHUBBINARY" -type d -exec paccache -v -r -k 1 -c {} \; # clean cache - setrepoadd=1 - else - echo -e "$FAILEDBUILDMSG" - rm -rf $folder/PKGBUILD - failedbuild=1 - fi - fi - fi - fi - fi - fi + git checkout origin/"$BRANCH" &>/dev/null + git reset --hard origin/"$BRANCH" # reset files to how they were before + git clean -f -d # clear any other changes you've done + buildoptions # Check if it's a Git Package to create a log for updating - cd "$DIR/packages/$GITDIR/$p" + cd "$DIR/packages/$GITDIR/$p" || exit gitfile=.gitcheck gitcheck="$(echo "$p" | tee "$gitfile")" if [ -n "$gitcheck" ]; then if grep -E *'-git' "$gitfile" &>/dev/null; then # If result matches (Name has a -git string) makepkg --nobuild makepkg --printsrcinfo >.SRCINFO - gitpkgname="$(cat .SRCINFO | grep 'source =' | awk -F"/" '{print $NF}' | cut -f1 -d".")" # Try if upstream pkg name is in "source =" - gitpkgname1="$(cat .SRCINFO | grep 'pkgname =' | cut -c 11-)" # Try if upstream pkg name is in "pkgname =" - gitpkgname2="$(cat .SRCINFO | grep 'url =' | awk -F"/" '{print $NF}')" # Try if upstream pkg name is in "url =" - gitpkgname3="$(cat "$gitfile" | cut -c1-5)" # Cut the first 5 letters of the "-git" package name - if [ -e "$gitpkgname" ]; then - if [[ -n "$gitpkgname" ]]; then - cd "$gitpkgname" - fi - else - if [ -e "$gitpkgname1" ]; then - if [[ -n "$gitpkgname1" ]]; then - cd "$gitpkgname1" - fi - else - if [ -e "$gitpkgname2" ]; then - if [[ -n "$gitpkgname2" ]]; then - cd "$gitpkgname2" - fi - else - ls | grep "$gitpkgname3" | tee .gitsrc &>/dev/null # Create a list of all matching "pkgname" files via "ls" - cat .gitsrc | while read line || [[ -n $line ]]; do # Try to find the upstream source folder by checking the matching names in a loop. - if [ -d "$line" ]; then # Check if one of the matching names of the "while loop" is a folder - # echo "Directory "$line" exists." - echo "$line" | tee .srcf &>/dev/null - fi - done - rm -rf .gitsrc &>/dev/null - GITPKGSRC="$(cat .srcf)" - cd "$GITPKGSRC" - rm -rf .gitsrc - fi - fi - fi - + # Find "-git" package source + gitpkg_src_check # Create a gitlog to check for updates gitversionfile=.gitversioncheck gitversioncheck="$(git show | head -1 | tee "$gitversionfile")" # Generate a gitcheck file for a update reference if [[ -n "$gitversioncheck" ]]; then - cd "$DIR/packages/$GITDIR/$p" - echo -e "\e[2m[Git-Version Updated]\e[0m" + cd "$DIR/packages/$GITDIR/$p" || exit rm -rf .onlinepkgbuild &>/dev/null return 1 fi @@ -345,124 +380,38 @@ function maincheck() { fi fi else + echo "Package does not exist local, downloading ..." - mkdir -p "$DIR/packages/$GITDIR/$p" && cd "$DIR/packages/$GITDIR/$p" + + onlinecheck + mkdir -p "$DIR/packages/$GITDIR/$p" && cd "$DIR/packages/$GITDIR/$p" || exit git clone --single-branch --branch "$BRANCH" "$GITHUBCLONEURL""$p".git folder="$(ls)" echo "$folder" - mv $folder original &>/dev/null - cd original + mv "$folder" original &>/dev/null + cd original || exit ls mv * .* "$DIR/packages/$GITDIR/$p" &>/dev/null - cd "$DIR/packages/$GITDIR/$p" - rm -rf original + cd "$DIR/packages/$GITDIR/$p" || exit + rm -rf original &>/dev/null mkdir -p "$DIR/$GITHUBBINARY" - if [ "$var" == "1" ]; then - if cd .. && buildpkg -c -p $folder; then - mv /var/cache/manjaro-tools/pkg/stable/x86_64/*.*.tar.* "$DIR/$GITHUBBINARY" &>/dev/null - find "$DIR/$GITHUBBINARY" -type d -exec paccache -v -r -k 1 -c {} \; # clean cache - setrepoadd=1 - else - echo -e "$FAILEDBUILDMSG" - rm -rf $folder/PKGBUILD - failedbuild=1 - fi - else - if [ "$var" == "0" ]; then - if time makepkg $MARG1 $MARG2 $MARG3 $MARG4 $MARG5 $MARG6; then - mv *.*.tar.* "$DIR/$GITHUBBINARY" &>/dev/null - find "$DIR/$GITHUBBINARY" -type d -exec paccache -v -r -k 1 -c {} \; # clean cache - setrepoadd=1 - else - echo -e "$FAILEDBUILDMSG" - rm -rf PKGBUILD - failedbuild=1 - fi - else - if [ "$var" == "2" ]; then - if time makepkg -srci --noconfirm; then - echo "installed ..." - else - echo -e "$FAILEDBUILDMSG" - rm -rf PKGBUILD - failedbuild=1 - fi - else - if [ "$var" == "3" ]; then - if cd .. && buildpkg $ARG1 $ARG2 $ARG3 $ARG4 $ARG5 $ARG6 $folder; then - mv /var/cache/manjaro-tools/pkg/$ARG2/$ARG5/*.*.tar.* "$DIR/$GITHUBBINARY" &>/dev/null - find "$DIR/$GITHUBBINARY" -type d -exec paccache -v -r -k 1 -c {} \; # clean cache - setrepoadd=1 - else - echo -e "$FAILEDBUILDMSG" - rm -rf $folder/PKGBUILD - failedbuild=1 - fi - else - if [ "$var" == "4" ]; then - if cd .. && sudo chrootbuild $MCARG1 $MCARG2 $MCARG3 $MCARG4 $MCARG5 $MCARG6 $folder; then - mv *.*.tar.* "$DIR/$GITHUBBINARY" &>/dev/null - find "$DIR/$GITHUBBINARY" -type d -exec paccache -v -r -k 1 -c {} \; # clean cache - setrepoadd=1 - else - echo -e "$FAILEDBUILDMSG" - rm -rf $folder/PKGBUILD - failedbuild=1 - fi - fi - fi - fi - fi - fi + buildoptions # Check if it's a Git Package to create a log for updating - cd "$DIR/packages/$GITDIR/$p" + cd "$DIR/packages/$GITDIR/$p" || exit gitfile=.gitcheck gitcheck="$(echo "$p" | tee "$gitfile")" if [ -n "$gitcheck" ]; then if grep -E *'-git' "$gitfile" &>/dev/null; then # If result matches (Name has a -git string) makepkg --nobuild makepkg --printsrcinfo >.SRCINFO - gitpkgname="$(cat .SRCINFO | grep 'source =' | awk -F"/" '{print $NF}' | cut -f1 -d".")" # Try if upstream pkg name is in "source =" - gitpkgname1="$(cat .SRCINFO | grep 'pkgname =' | cut -c 11-)" # Try if upstream pkg name is in "pkgname =" - gitpkgname2="$(cat .SRCINFO | grep 'url =' | awk -F"/" '{print $NF}')" # Try if upstream pkg name is in "url =" - gitpkgname3="$(cat "$gitfile" | cut -c1-5)" # Cut the first 5 letters of the "-git" package name - if [ -e "$gitpkgname" ]; then - if [[ -n "$gitpkgname" ]]; then - cd "$gitpkgname" - fi - else - if [ -e "$gitpkgname1" ]; then - if [[ -n "$gitpkgname1" ]]; then - cd "$gitpkgname1" - fi - else - if [ -e "$gitpkgname2" ]; then - if [[ -n "$gitpkgname2" ]]; then - cd "$gitpkgname2" - fi - else - ls | grep "$gitpkgname3" | tee .gitsrc &>/dev/null # Create a list of all matching "pkgname" files via "ls" - cat .gitsrc | while read line || [[ -n $line ]]; do # Try to find the upstream source folder by checking the matching names in a loop. - if [ -d "$line" ]; then # Check if one of the matching names of the "while loop" is a folder - # echo "Directory "$line" exists." - echo "$line" | tee .srcf &>/dev/null - fi - done - rm -rf .gitsrc &>/dev/null - GITPKGSRC="$(cat .srcf)" - cd "$GITPKGSRC" - rm -rf .gitsrc - fi - fi - fi - + # Find "-git" package source + gitpkg_src_check # Create a gitlog to check for updates gitversionfile=.gitversioncheck gitversioncheck="$(git show | head -1 | tee "$gitversionfile")" # Generate a gitcheck file for a update reference if [[ -n "$gitversioncheck" ]]; then - cd "$DIR/packages/$GITDIR/$p" - echo -e "\e[2m[Git-Version]\e[0m" + cd "$DIR/packages/$GITDIR/$p" || exit rm -rf .onlinepkgbuild &>/dev/null return 1 fi @@ -472,11 +421,28 @@ function maincheck() { fi } # +# Additional Files: +# Checked packages: +CHECKEDPKGS=$CACHEDIR/.pkgs.txt +# Failed to build packages: +FAILEDPKGS=$CACHEDIR/.failed.txt +# Compiled packages +COMPILEDPKGS=$CACHEDIR/.compiled.txt + +# Function for checked and failed to build packages +function checked_and_failed_pkgs() { + printf '%s\n' "$p" | tee -a "$CHECKEDPKGS" &>/dev/null # Checked Packages + if [ "$failedbuild" == "1" ]; then + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$FAILEDPKGS" &>/dev/null # Failed to build packages + failedbuild=0 + fi +} # Update, install, build packages from Github repos with available PKGBUILD function githubversion() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac # Skip lines that start with "#" echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBCLONEURL=$GITHUBCLONEURLC GITHUBURL="$GITHUBURLC"$p"/"$BRANCH"/PKGBUILD" @@ -485,22 +451,20 @@ function githubversion() { if [ "$setrepoadd" == "1" ]; then setrepoaddgithub1=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null # Compiled packages + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null # Compiled packages fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null # Checked Packages - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 - fi - done <$GITHUBSOURCE #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITHUBSOURCE" #< $GITHUBSOURCE1 } # # Additional Custom Github repo # Update, install, build packages from Github repos with available PKGBUILD function githubversioncustom() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$GITHUBBINARYCUSTOM BRANCH=$BRANCHCUSTOM @@ -511,22 +475,20 @@ function githubversioncustom() { if [ "$setrepoadd" == "1" ]; then setrepoaddgithub2=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null - fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - done <$GITHUBSOURCECUSTOM #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITHUBSOURCECUSTOM" #< $GITHUBSOURCE1 } # # Additional Custom Github repo # Update, install, build packages from Github repos with available PKGBUILD function githubversioncustom2() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$GITHUBBINARYCUSTOM2 BRANCH=$BRANCHCUSTOM2 @@ -537,22 +499,20 @@ function githubversioncustom2() { if [ "$setrepoadd" == "1" ]; then setrepoaddgithub3=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 - fi - done <$GITHUBSOURCECUSTOM2 #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITHUBSOURCECUSTOM2" #< $GITHUBSOURCE1 } # # Additional Custom Github repo # Update, install, build packages from Github repos with available PKGBUILD function githubversioncustom3() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$GITHUBBINARYCUSTOM3 BRANCH=$BRANCHCUSTOM3 @@ -563,22 +523,20 @@ function githubversioncustom3() { if [ "$setrepoadd" == "1" ]; then setrepoaddgithub4=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null - fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - done <$GITHUBSOURCECUSTOM3 #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITHUBSOURCECUSTOM3" #< $GITHUBSOURCE1 } # # Additional Custom Github repo # Update, install, build packages from Github repos with available PKGBUILD function githubversioncustom4() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$GITHUBBINARYCUSTOM4 BRANCH=$BRANCHCUSTOM4 @@ -589,22 +547,20 @@ function githubversioncustom4() { if [ "$setrepoadd" == "1" ]; then setrepoaddgithub5=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 - fi - done <$GITHUBSOURCECUSTOM4 #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITHUBSOURCECUSTOM4" #< $GITHUBSOURCE1 } # # Additional Custom Github repo # Update, install, build packages from Github repos with available PKGBUILD function githubversioncustom5() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$GITHUBBINARYCUSTOM5 BRANCH=$BRANCHCUSTOM5 @@ -615,22 +571,20 @@ function githubversioncustom5() { if [ "$setrepoadd" == "1" ]; then setrepoaddgithub6=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null - fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - done <$GITHUBSOURCECUSTOM5 #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITHUBSOURCECUSTOM5" #< $GITHUBSOURCE1 } # # Additional Gitlab repo # Update, install, build packages from Gitlab repos with available PKGBUILD function gitlabversion() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$GITLABBINARY BRANCH=$BRANCHGITLAB @@ -641,22 +595,20 @@ function gitlabversion() { if [ "$setrepoadd" == "1" ]; then setrepoaddgitlab1=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 - fi - done <$GITLABSOURCE #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITLABSOURCE" #< $GITHUBSOURCE1 } # # Additional Custom Gitlab repo # Update, install, build packages from Gitlab repos with available PKGBUILD function gitlabversioncustom() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$GITLABBINARYCUSTOM BRANCH=$BRANCHGITLABCUSTOM @@ -667,22 +619,20 @@ function gitlabversioncustom() { if [ "$setrepoadd" == "1" ]; then setrepoaddgitlab2=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null - fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - done <$GITLABSOURCECUSTOM #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITLABSOURCECUSTOM" #< $GITHUBSOURCE1 } # # Additional Custom Gitlab repo extra 2 # Update, install, build packages from Gitlab repos with available PKGBUILD function gitlabversioncustom2() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$GITLABBINARYCUSTOM2 BRANCH=$BRANCHGITLABCUSTOM2 @@ -693,22 +643,20 @@ function gitlabversioncustom2() { if [ "$setrepoadd" == "1" ]; then setrepoaddgitlab3=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 - fi - done <$GITLABSOURCECUSTOM2 #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITLABSOURCECUSTOM2" #< $GITHUBSOURCE1 } # # Additional Custom Gitlab repo extra 3 # Update, install, build packages from Gitlab repos with available PKGBUILD function gitlabversioncustom3() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$GITLABBINARYCUSTOM3 BRANCH=$BRANCHGITLABCUSTOM3 @@ -719,14 +667,11 @@ function gitlabversioncustom3() { if [ "$setrepoadd" == "1" ]; then setrepoaddgitlab4=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null - fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - done <$GITLABSOURCECUSTOM3 #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITLABSOURCECUSTOM3" #< $GITHUBSOURCE1 } # # @@ -734,8 +679,9 @@ function gitlabversioncustom3() { # Update, install, build packages from Gitlab repos with available PKGBUILD function gitlabversioncustom4() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$GITLABBINARYCUSTOM4 BRANCH=$BRANCHGITLABCUSTOM4 @@ -746,14 +692,11 @@ function gitlabversioncustom4() { if [ "$setrepoadd" == "1" ]; then setrepoaddgitlab5=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 - fi - done <$GITLABSOURCECUSTOM4 #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITLABSOURCECUSTOM4" #< $GITHUBSOURCE1 } # # @@ -761,8 +704,9 @@ function gitlabversioncustom4() { # Update, install, build packages from Gitlab repos with available PKGBUILD function gitlabversioncustom5() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$GITLABBINARYCUSTOM5 BRANCH=$BRANCHGITLABCUSTOM5 @@ -773,22 +717,20 @@ function gitlabversioncustom5() { if [ "$setrepoadd" == "1" ]; then setrepoaddgitlab6=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null - fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - done <$GITLABSOURCECUSTOM5 #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$GITLABSOURCECUSTOM5" #< $GITHUBSOURCE1 } # # Additional AUR repo # Update, install, build packages from AUR function aur() { while IFS="" read -r p || [ -n "$p" ]; do + case "$p" in \#*) continue ;; esac echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry GITHUBBINARY=$AURBINARY BRANCH=master @@ -799,14 +741,11 @@ function aur() { if [ "$setrepoadd" == "1" ]; then setrepoaddaur=1 setrepoadd=0 - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/instpkgs.txt" &>/dev/null + printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$COMPILEDPKGS" &>/dev/null fi - printf '%s\n' "$p" | tee -a "$DIR/packages/pkgs.txt" &>/dev/null - if [ "$failedbuild" == "1" ]; then - printf '%s\n' "$p"-["$GITHUBBINARY"] | tee -a "$DIR/packages/failed.txt" &>/dev/null # Failed to build packages - failedbuild=0 - fi - done <$AURSOURCE #< $GITHUBSOURCE1 + # Function for checked and failed to build packages + checked_and_failed_pkgs + done <"$AURSOURCE" #< $GITHUBSOURCE1 } # # Run the script once @@ -822,7 +761,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub1" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARY/$GITHUBBINARY.db.tar.gz $DIR/$GITHUBBINARY/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITHUBBINARY"/"$GITHUBBINARY".db.tar.gz "$DIR"/"$GITHUBBINARY"/*.pkg.* &>/dev/null setrepoaddgithub1=0 fi fi @@ -833,7 +772,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub2" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARYCUSTOM/$GITHUBBINARYCUSTOM.db.tar.gz $DIR/$GITHUBBINARYCUSTOM/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITHUBBINARYCUSTOM"/"$GITHUBBINARYCUSTOM".db.tar.gz "$DIR"/"$GITHUBBINARYCUSTOM"/*.pkg.* &>/dev/null setrepoaddgithub2=0 fi fi @@ -844,7 +783,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub3" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARYCUSTOM2/$GITHUBBINARYCUSTOM2.db.tar.gz $DIR/$GITHUBBINARYCUSTOM2/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITHUBBINARYCUSTOM2"/"$GITHUBBINARYCUSTOM2".db.tar.gz "$DIR"/"$GITHUBBINARYCUSTOM2"/*.pkg.* &>/dev/null setrepoaddgithub3=0 fi fi @@ -855,7 +794,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub4" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARYCUSTOM3/$GITHUBBINARYCUSTOM3.db.tar.gz $DIR/$GITHUBBINARYCUSTOM3/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITHUBBINARYCUSTOM3"/"$GITHUBBINARYCUSTOM3".db.tar.gz "$DIR"/"$GITHUBBINARYCUSTOM3"/*.pkg.* &>/dev/null setrepoaddgithub4=0 fi fi @@ -866,7 +805,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub5" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARYCUSTOM4/$GITHUBBINARYCUSTOM4.db.tar.gz $DIR/$GITHUBBINARYCUSTOM4/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITHUBBINARYCUSTOM4"/"$GITHUBBINARYCUSTOM4".db.tar.gz "$DIR"/"$GITHUBBINARYCUSTOM4"/*.pkg.* &>/dev/null setrepoaddgithub5=0 fi fi @@ -877,7 +816,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub6" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARYCUSTOM5/$GITHUBBINARYCUSTOM5.db.tar.gz $DIR/$GITHUBBINARYCUSTOM5/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITHUBBINARYCUSTOM5"/"$GITHUBBINARYCUSTOM5".db.tar.gz "$DIR"/"$GITHUBBINARYCUSTOM5"/*.pkg.* &>/dev/null setrepoaddgithub6=0 fi fi @@ -888,7 +827,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab1" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARY/$GITLABBINARY.db.tar.gz $DIR/$GITLABBINARY/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITLABBINARY"/"$GITLABBINARY".db.tar.gz "$DIR"/"$GITLABBINARY"/*.pkg.* &>/dev/null setrepoaddgitlab1=0 fi fi @@ -899,7 +838,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab2" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARYCUSTOM/$GITLABBINARYCUSTOM.db.tar.gz $DIR/$GITLABBINARYCUSTOM/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITLABBINARYCUSTOM"/"$GITLABBINARYCUSTOM".db.tar.gz "$DIR"/"$GITLABBINARYCUSTOM"/*.pkg.* &>/dev/null setrepoaddgitlab2=0 fi fi @@ -910,7 +849,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab3" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARYCUSTOM2/$GITLABBINARYCUSTOM2.db.tar.gz $DIR/$GITLABBINARYCUSTOM2/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITLABBINARYCUSTOM2"/"$GITLABBINARYCUSTOM2".db.tar.gz "$DIR"/"$GITLABBINARYCUSTOM2"/*.pkg.* &>/dev/null setrepoaddgitlab3=0 fi fi @@ -921,7 +860,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab4" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARYCUSTOM3/$GITLABBINARYCUSTOM3.db.tar.gz $DIR/$GITLABBINARYCUSTOM3/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITLABBINARYCUSTOM3"/"$GITLABBINARYCUSTOM3".db.tar.gz "$DIR"/"$GITLABBINARYCUSTOM3"/*.pkg.* &>/dev/null setrepoaddgitlab4=0 fi fi @@ -932,7 +871,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab5" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARYCUSTOM4/$GITLABBINARYCUSTOM4.db.tar.gz $DIR/$GITLABBINARYCUSTOM4/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITLABBINARYCUSTOM4"/"$GITLABBINARYCUSTOM4".db.tar.gz "$DIR"/"$GITLABBINARYCUSTOM4"/*.pkg.* &>/dev/null setrepoaddgitlab5=0 fi fi @@ -943,7 +882,7 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab6" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARYCUSTOM5/$GITLABBINARYCUSTOM5.db.tar.gz $DIR/$GITLABBINARYCUSTOM5/*.pkg.* &>/dev/null + repo-add "$DIR"/"$GITLABBINARYCUSTOM5"/"$GITLABBINARYCUSTOM5".db.tar.gz "$DIR"/"$GITLABBINARYCUSTOM5"/*.pkg.* &>/dev/null setrepoaddgitlab6=0 fi fi @@ -954,27 +893,28 @@ function manualsync() { # Local pacman repository update - rename repo to your preference if [ "$REPOADD" == "1" ] && [ "$setrepoaddaur" == "1" ]; then echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$AURBINARY/$AURBINARY.db.tar.gz $DIR/$AURBINARY/*.pkg.* &>/dev/null + repo-add "$DIR"/"$AURBINARY"/"$AURBINARY".db.tar.gz "$DIR"/"$AURBINARY"/*.pkg.* &>/dev/null setrepoaddaur=0 fi fi - if [ -e "$DIR/packages/pkgs.txt" ]; then + # Print output summary + if [ -e "$CHECKEDPKGS" ]; then echo "" - checked=$(cat "$DIR/packages/pkgs.txt" | wc -l) + checked=$(cat "$CHECKEDPKGS" | wc -l) echo -e " \e[3m🗱 Checked Package(s): $checked\e[0m" - rm -rf "$DIR/packages/pkgs.txt" + rm -rf "$CHECKEDPKGS" &>/dev/null fi - if [ -e "$DIR/packages/instpkgs.txt" ]; then - checked=$(cat "$DIR/packages/instpkgs.txt" | wc -l) + if [ -e "$COMPILEDPKGS" ]; then + checked=$(cat "$COMPILEDPKGS" | wc -l) echo -e " \e[3m🗱 Compiled Package(s): $checked\e[0m" - cat -b "$DIR/packages/instpkgs.txt" - rm -rf "$DIR/packages/instpkgs.txt" + cat -b "$COMPILEDPKGS" + rm -rf "$COMPILEDPKGS" &>/dev/null fi - if [ -e "$DIR/packages/failed.txt" ]; then - checked=$(cat "$DIR/packages/failed.txt" | wc -l) + if [ -e "$FAILEDPKGS" ]; then + checked=$(cat "$FAILEDPKGS" | wc -l) echo -e " \e[3m🗱 Failed to Build: $checked\e[0m" - cat -b "$DIR/packages/failed.txt" - rm -rf "$DIR/packages/failed.txt" + cat -b "$FAILEDPKGS" + rm -rf "$FAILEDPKGS" &>/dev/null fi echo "" echo -e "\e[1m Elapsed Time: \e[0m" @@ -984,180 +924,13 @@ function manualsync() { # Run the script in a loop function main() { while true; do - - clear - - time { - if [ "$SETGITHUBREPO" == "1" ]; then - githubversion - echo "" - echo -e "$GITHUBMSG" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub1" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARY/$GITHUBBINARY.db.tar.gz $DIR/$GITHUBBINARY/*.pkg.* &>/dev/null - setrepoaddgithub1=0 - fi - fi - if [ "$SETCUSTGITHUBREPO" == "1" ]; then - githubversioncustom - echo "" - echo -e "$GITHUBMSGCUST" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub2" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARYCUSTOM/$GITHUBBINARYCUSTOM.db.tar.gz $DIR/$GITHUBBINARYCUSTOM/*.pkg.* &>/dev/null - setrepoaddgithub2=0 - fi - fi - if [ "$SETCUSTGITHUBREPO2" == "1" ]; then - githubversioncustom2 - echo "" - echo -e "$GITHUBMSGCUST2" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub3" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARYCUSTOM2/$GITHUBBINARYCUSTOM2.db.tar.gz $DIR/$GITHUBBINARYCUSTOM2/*.pkg.* &>/dev/null - setrepoaddgithub3=0 - fi - fi - if [ "$SETCUSTGITHUBREPO3" == "1" ]; then - githubversioncustom3 - echo "" - echo -e "$GITHUBMSGCUST3" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub4" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARYCUSTOM3/$GITHUBBINARYCUSTOM3.db.tar.gz $DIR/$GITHUBBINARYCUSTOM3/*.pkg.* &>/dev/null - setrepoaddgithub4=0 - fi - fi - if [ "$SETCUSTGITHUBREPO4" == "1" ]; then - githubversioncustom4 - echo "" - echo -e "$GITHUBMSGCUST4" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub5" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARYCUSTOM4/$GITHUBBINARYCUSTOM4.db.tar.gz $DIR/$GITHUBBINARYCUSTOM4/*.pkg.* &>/dev/null - setrepoaddgithub5=0 - fi - fi - if [ "$SETCUSTGITHUBREPO5" == "1" ]; then - githubversioncustom5 - echo "" - echo -e "$GITHUBMSGCUST5" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgithub6" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITHUBBINARYCUSTOM5/$GITHUBBINARYCUSTOM5.db.tar.gz $DIR/$GITHUBBINARYCUSTOM5/*.pkg.* &>/dev/null - setrepoaddgithub6=0 - fi - fi - if [ "$SETGITLABREPO" == "1" ]; then - gitlabversion - echo "" - echo -e "$GITLABMSG" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab1" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARY/$GITLABBINARY.db.tar.gz $DIR/$GITLABBINARY/*.pkg.* &>/dev/null - setrepoaddgitlab1=0 - fi - fi - if [ "$SETGITLABREPOCUSTOM" == "1" ]; then - gitlabversioncustom - echo "" - echo -e "$GITLABMSGCUST" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab2" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARYCUSTOM/$GITLABBINARYCUSTOM.db.tar.gz $DIR/$GITLABBINARYCUSTOM/*.pkg.* &>/dev/null - setrepoaddgitlab2=0 - fi - fi - if [ "$SETGITLABREPOCUSTOM2" == "1" ]; then - gitlabversioncustom2 - echo "" - echo -e "$GITLABMSGCUST2" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab3" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARYCUSTOM2/$GITLABBINARYCUSTOM2.db.tar.gz $DIR/$GITLABBINARYCUSTOM2/*.pkg.* &>/dev/null - setrepoaddgitlab3=0 - fi - fi - if [ "$SETGITLABREPOCUSTOM3" == "1" ]; then - gitlabversioncustom3 - echo "" - echo -e "$GITLABMSGCUST3" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab4" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARYCUSTOM3/$GITLABBINARYCUSTOM3.db.tar.gz $DIR/$GITLABBINARYCUSTOM3/*.pkg.* &>/dev/null - setrepoaddgitlab4=0 - fi - fi - if [ "$SETGITLABREPOCUSTOM4" == "1" ]; then - gitlabversioncustom4 - echo "" - echo -e "$GITLABMSGCUST4" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab5" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARYCUSTOM4/$GITLABBINARYCUSTOM4.db.tar.gz $DIR/$GITLABBINARYCUSTOM4/*.pkg.* &>/dev/null - setrepoaddgitlab5=0 - fi - fi - if [ "$SETGITLABREPOCUSTOM5" == "1" ]; then - gitlabversioncustom5 - echo "" - echo -e "$GITLABMSGCUST5" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddgitlab6" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$GITLABBINARYCUSTOM5/$GITLABBINARYCUSTOM5.db.tar.gz $DIR/$GITLABBINARYCUSTOM5/*.pkg.* &>/dev/null - setrepoaddgitlab6=0 - fi - fi - if [ "$AURREPO" == "1" ]; then - aur - echo "" - echo -e "$AURMSG" - # Local pacman repository update - rename repo to your preference - if [ "$REPOADD" == "1" ] && [ "$setrepoaddaur" == "1" ]; then - echo -e "\e[1mUpdating Database ...\e[0m" - repo-add $DIR/$AURBINARY/$AURBINARY.db.tar.gz $DIR/$AURBINARY/*.pkg.* &>/dev/null - setrepoaddaur=0 - fi - fi - if [ -e "$DIR/packages/pkgs.txt" ]; then - echo "" - checked=$(cat "$DIR/packages/pkgs.txt" | wc -l) - echo -e " \e[3m🗱 Checked Package(s): $checked\e[0m" - rm -rf "$DIR/packages/pkgs.txt" - fi - if [ -e "$DIR/packages/instpkgs.txt" ]; then - checked=$(cat "$DIR/packages/instpkgs.txt" | wc -l) - echo -e " \e[3m🗱 Compiled Package(s): $checked\e[0m" - cat -b "$DIR/packages/instpkgs.txt" - rm -rf "$DIR/packages/instpkgs.txt" - fi - if [ -e "$DIR/packages/failed.txt" ]; then - checked=$(cat "$DIR/packages/failed.txt" | wc -l) - echo -e " \e[3m🗱 Failed to Build: $checked\e[0m" - cat -b "$DIR/packages/failed.txt" - rm -rf "$DIR/packages/failed.txt" - fi - echo "" - echo -e "\e[1m Elapsed Time: \e[0m" - } + manualsync echo "" echo -e "\e[1mPress \e[7m[Ctrl]\e[0m+\e[1m\e[7m[C]\e[0m \e[1mto stop \e[3mautogit\e[0m" countdown() { secs=$timer shift - while [ $secs -gt 0 ]; do + while [ "$secs" -gt 0 ]; do printf "\r\033[KWaiting %.d seconds for next sync ..." $((secs--)) sleep 1 done @@ -1175,27 +948,45 @@ function main() { # # Select the source to edit for the fzf menu function pkgchooser() { - # Check if -d (DRY RUN) is run for a different text - if [ "$dryrun" == "1" ]; then - # Select the source to edit - SELECTFILE=$(ls "$DIR"/reponames | fzf -i --reverse --info=inline --prompt="Enter string > " --header=" ENTER to remove package(s) - from selected source file. - ESC to quit. [DRY RUN] " --preview 'cat "$HOME"/autogit/reponames/{}' --no-unicode "$(if (($(tput cols) >= 80)); then echo "--preview-window=right:55%:wrap"; else echo "--preview-window=bottom:60%:wrap"; fi)" | xargs -ro >"$DIR"/reponames/.selected.txt) - $SELECTFILE + # Check if -e (edit) is run for a different text + if [ "$edit" == "1" ]; then + # shellcheck disable=SC2120 + editfzf() { + cd "$DIR"/reponames || exit + files=() + while IFS= read -r -d '' file; do + files+=("$file") + done < <(ls "$DIR"/reponames | fzf -i --reverse --info=inline --prompt="Enter string > " --header=" ENTER to edit package(s) + from selected source file(s). + ESC to quit." --preview "cat $DIR/reponames/{}" --no-unicode "$(if (($(tput cols) >= 80)); then echo "--preview-window=right:55%:wrap"; else echo "--preview-window=bottom:60%:wrap"; fi)" --multi --print0) + + ((${#files})) || return + "${VISUAL:-${EDITOR:-vi}}" "$@" "${files[@]}" + } + editfzf else - # Check if -b (REBUILD) is run for a different text - if [ "$rebuild" == "1" ]; then + # Check if -d (DRY RUN) is run for a different text + if [ "$dryrun" == "1" ]; then # Select the source to edit - SELECTFILE=$(ls "$DIR"/reponames | fzf -i --reverse --info=inline --prompt="Enter string > " --header=" ENTER to rebuild package(s) + SELECTFILE=$(ls "$DIR"/reponames | fzf -i --reverse --info=inline --prompt="Enter string > " --header=" ENTER to remove package(s) from selected source file. - ESC to quit. " --preview 'cat "$HOME"/autogit/reponames/{}' --no-unicode "$(if (($(tput cols) >= 80)); then echo "--preview-window=right:55%:wrap"; else echo "--preview-window=bottom:60%:wrap"; fi)" | xargs -ro >"$DIR"/reponames/.selected.txt) + ESC to quit. [DRY RUN] " --preview "cat $DIR/reponames/{}" --no-unicode "$(if (($(tput cols) >= 80)); then echo "--preview-window=right:55%:wrap"; else echo "--preview-window=bottom:60%:wrap"; fi)" | xargs -ro >"$DIR"/reponames/.selected.txt) $SELECTFILE else - # Select the source to edit - SELECTFILE=$(ls "$DIR"/reponames | fzf -i --reverse --info=inline --prompt="Enter string > " --header=" ENTER to remove package(s) + # Check if -b (REBUILD) is run for a different text + if [ "$rebuild" == "1" ]; then + # Select the source to edit + SELECTFILE=$(ls "$DIR"/reponames | fzf -i --reverse --info=inline --prompt="Enter string > " --header=" ENTER to rebuild package(s) from selected source file. - ESC to quit. " --preview 'cat "$HOME"/autogit/reponames/{}' --no-unicode "$(if (($(tput cols) >= 80)); then echo "--preview-window=right:55%:wrap"; else echo "--preview-window=bottom:60%:wrap"; fi)" | xargs -ro >"$DIR"/reponames/.selected.txt) - $SELECTFILE + ESC to quit. " --preview "cat $DIR/reponames/{}" --no-unicode "$(if (($(tput cols) >= 80)); then echo "--preview-window=right:55%:wrap"; else echo "--preview-window=bottom:60%:wrap"; fi)" | xargs -ro >"$DIR"/reponames/.selected.txt) + $SELECTFILE + else + # Select the source to edit + SELECTFILE=$(ls "$DIR"/reponames | fzf -i --reverse --info=inline --prompt="Enter string > " --header=" ENTER to remove package(s) + from selected source file. + ESC to quit. " --preview "cat $DIR/reponames/{}" --no-unicode "$(if (($(tput cols) >= 80)); then echo "--preview-window=right:55%:wrap"; else echo "--preview-window=bottom:60%:wrap"; fi)" | xargs -ro >"$DIR"/reponames/.selected.txt) + $SELECTFILE + fi fi fi @@ -1250,10 +1041,10 @@ function removepkgs() { clear while IFS="" read -r p || [ -n "$p" ]; do echo "" - cd "$DIR" + cd "$DIR" || exit printf '\e[1;36m%-6s\e[m%s\n' "𝌤 $p" # Print package list entry # Use the eval function which resolves in this example the GETSELECTED variable before the awk is run. - SOURCEPKGDIR=$(eval "awk '/"${GETSELECTED}"/ && /SOURCE/'" '"$DIR"/autogit.conf' | grep -E -o ".{0,20}=" | rev | cut -c 2- | rev) # Find Reponame for source folder + SOURCEPKGDIR=$(eval "awk '/""${GETSELECTED}""/ && /SOURCE/'" '"$DIR"/autogit.conf' | grep -E -o ".{0,20}=" | rev | cut -c 2- | rev) # Find Reponame for source folder if [ "$SOURCEPKGDIR" == "GITHUBSOURCE" ]; then PKGDIR=Github1 PKGBIN=$GITHUBBINARY @@ -1318,12 +1109,12 @@ function removepkgs() { fi fi fi - echo ""$DIR"/packages/$PKGDIR/"$p"" | tee "$DIR"/reponames/.rm.txt &>/dev/null + echo """$DIR""/packages/$PKGDIR/""$p""" | tee "$DIR"/reponames/.rm.txt &>/dev/null location=$(cat "$DIR"/reponames/.rm.txt) #Source package folder to remove if [ "$dryrun" == "1" ]; then if [ -e "$location" ]; then # If file exists (source file folder) - echo -e "\e[1m\e[32m==>\e[0m \e[1mFound Source:\e[0m \e[1m"\"$location\""\e[0m" + echo -e "\e[1m\e[32m==>\e[0m \e[1mFound Source:\e[0m \e[1m"\""$location"\""\e[0m" echo -e "\e[1m\e[34m -> Removing Source Folder ...\e[0m" echo "Dry Run" else @@ -1332,7 +1123,7 @@ function removepkgs() { fi else if [ -e "$location" ]; then # If file exists (source file folder) - echo -e "\e[1m\e[32m==>\e[0m \e[1mFound Source:\e[0m \e[1m"\"$location\""\e[0m" + echo -e "\e[1m\e[32m==>\e[0m \e[1mFound Source:\e[0m \e[1m"\""$location"\""\e[0m" echo -e "\e[1m\e[34m -> Removing Source Folder ...\e[0m" sourcelocation=1 else @@ -1343,7 +1134,7 @@ function removepkgs() { # Find the Filename #cd ""$DIR"/packages/$PKGDIR/"$p"" if [ -e "$location" ]; then # If file exists (source file folder) - cd $location + cd "$location" || exit #ls filename1=$(cat PKGBUILD | grep 'pkgbase=' | cut -c 9-) filename2=$(cat PKGBUILD | grep 'pkgname=' | cut -c 9-) @@ -1366,7 +1157,8 @@ function removepkgs() { if [ "$dryrun" == "1" ]; then if [ -n "$locationbin" ]; then # If file exists (binary folder) #echo - echo -e "\e[1m\e[32m==>\e[0m \e[1mFound Binary:\e[0m \e[1m"\"$locationbin\""\e[0m" + echo -e "\e[1m\e[32m==>\e[0m \e[1mFound Binary:\e[0m" + echo -e "\e[1m""$locationbin""\e[0m" echo -e "\e[1m\e[34m -> Removing Binary ...\e[0m" echo "Dry Run" @@ -1374,19 +1166,20 @@ function removepkgs() { if [ "$REPOADD" == "1" ]; then #echo echo -e "\e[1m\e[32m==>\e[0m \e[1mUpdating Database ...\e[0m" - echo -e "\e[1m\e[34m -> "$DIR"/"$PKGBIN" ...\e[0m" + echo -e "\e[1m\e[34m -> ""$DIR""/""$PKGBIN"" ...\e[0m" echo "Dry Run" fi fi else - if [ -n "$locationbin" ]; then # If file exists (binary folder) + if [ -n "$locationbin" ]; then # If file exists (binary) #echo - echo -e "\e[1m\e[32m==>\e[0m \e[1mFound Binary:\e[0m \e[1m"\"$locationbin\""\e[0m" + echo -e "\e[1m\e[32m==>\e[0m \e[1mFound Binary:\e[0m" + echo -e "\e[1m""$locationbin""\e[0m" echo -e "\e[1m\e[34m -> Removing Binary ...\e[0m" # Remove old database first as repo-add has no option to remove deleted binary's when updating it - rm -rf $DIR/$PKGBIN/*$PKGBIN* # remove database + rm -rf "${DIR:?}"/"$PKGBIN"/*"$PKGBIN"* # remove database locationbinn=$(echo "$locationbin") - rm -rf $locationbinn # remove binary + rm -rf "${DIR:?}"/"$PKGBIN"/"$locationbinn" # remove binary # Run repo-add if [ "$rebuild" == "1" ]; then @@ -1395,19 +1188,19 @@ function removepkgs() { if [ "$REPOADD" == "1" ]; then #echo echo -e "\e[1m\e[32m==>\e[0m \e[1mUpdating Database ...\e[0m" - echo -e "\e[1m\e[34m -> "$DIR"/$PKGBIN ...\e[0m" - repo-add -n $DIR/$PKGBIN/$PKGBIN.db.tar.gz $DIR/$PKGBIN/*.pkg.* &>/dev/null + echo -e "\e[1m\e[34m -> ""$DIR""/$PKGBIN ...\e[0m" + repo-add -n "$DIR"/"$PKGBIN"/"$PKGBIN".db.tar.gz "$DIR"/"$PKGBIN"/*.pkg.* &>/dev/null fi fi fi fi # remove the source folder here - not before! if [ "$sourcelocation" == "1" ]; then - rm -rf $location + rm -rf "$location" fi if [ "$dryrun" == "1" ]; then - echo -e "\e[1m\e[32m==>\e[0m \e[1mRemoving From List: "\"$p\""\e[0m" - echo -e "\e[1m\e[34m -> "$DIR/reponames/$GETSELECTED" ...\e[0m" + echo -e "\e[1m\e[32m==>\e[0m \e[1mRemoving From List: "\""$p"\""\e[0m" + echo -e "\e[1m\e[34m -> ""$DIR"/reponames/"$GETSELECTED"" ...\e[0m" echo "Dry Run" echo -e "\e[7m\e[31m\e[0m\e[0m" else @@ -1416,8 +1209,8 @@ function removepkgs() { autogitrun=1 sleep 3 else - echo -e "\e[1m\e[32m==>\e[0m \e[1mRemoving From List: "\"$p\""\e[0m" - echo -e "\e[1m\e[34m -> "$DIR/reponames/$GETSELECTED" ...\e[0m" + echo -e "\e[1m\e[32m==>\e[0m \e[1mRemoving From List: "\""$p"\""\e[0m" + echo -e "\e[1m\e[34m -> ""$DIR"/reponames/"$GETSELECTED"" ...\e[0m" grep -v "$p" "$DIR"/reponames/"$GETSELECTED" >"$DIR"/reponames/.pkglist mv "$DIR"/reponames/.pkglist "$DIR"/reponames/"$GETSELECTED" echo -e "\e[7m\e[31m\e[0m\e[0m" @@ -1430,11 +1223,11 @@ function removepkgs() { # function cleanup() { # Clean Up - rm -rf "$DIR"/reponames/.selected.txt - rm -rf "$DIR"/reponames/.output.txt - rm -rf "$DIR"/reponames/.toremove.txt - rm -rf "$DIR"/reponames/.rm.txt - rm -rf "$DIR"/reponames/.rmbin.txt + rm -rf "$DIR"/reponames/.selected.txt &>/dev/null + rm -rf "$DIR"/reponames/.output.txt &>/dev/null + rm -rf "$DIR"/reponames/.toremove.txt &>/dev/null + rm -rf "$DIR"/reponames/.rm.txt &>/dev/null + rm -rf "$DIR"/reponames/.rmbin.txt &>/dev/null } # Run fzf options # Flags @@ -1446,23 +1239,36 @@ while test $# -gt 0; do echo echo -e " Autogit runs by default without flags." echo -e " In order to run autogit, edit the options in" - echo -e " \""$DIR"/autogit.conf\"" + echo -e " \"""$DIR""/autogit.conf\"" echo echo -e " The provided flags will run a fzf UI to manage packages." echo echo -e " autogit [options]:" echo -e "" + echo -e " -e, --edit - [EDIT]" + echo -e " Edit Package List Entries (Commenting With '#' Is Supported)" + echo -e " NOTE: Make Sure That The (EDITOR) Environment Variable Is Set On Your System!" + echo -e "" echo -e " -d, --dryrun - [DRY RUN]" echo -e " Dry Run To Remove Packages - (Nothing Will Be Touched)" + echo -e "" echo -e " -b, --build - [REBUILD PACKAGES]" echo -e " Remove Package Source(s), Binary(s) And Rebuild The Packge(s)" + echo -e "" echo -e " -r, --remove - [REMOVE PACKAGES]" echo -e " Remove Package Source(s), Binary(s), Package List Entry(s)," echo -e " Old Database Files And Run \"repo-add\" If Enabled" + echo -e "" echo -e " -h, --help - This Help Text" echo exit ;; + -e | --edit) + edit=1 + pkgchooser + cleanup # needs to be run as last because we need to remove files when fzf has been quit with "ESC" + exit # this "exit" command is needed to prevent the UI from loading! + ;; -d | --dryrun) echo "Dry Run" dryrun=1 @@ -1481,7 +1287,7 @@ while test $# -gt 0; do removepkgs if [ "$autogitrun" == "1" ]; then # run autogit - cd + cd || exit autogit fi fi @@ -1506,6 +1312,9 @@ done # # Start script without flags function modecheck() { + # Trap (ctrl-c) + trap killproc INT + if [ "$mode" == "1" ]; then main else diff --git a/autogit.conf b/autogit.conf index 920e66a..5fc6ddb 100644 --- a/autogit.conf +++ b/autogit.conf @@ -1,31 +1,42 @@ # This is the main autogit configuration file. -# To use autogit this file needs to be changed according to the preferred Github, +# By default autogit will create a local configuration in "$HOME" on the first run. +# This can be changed by setting "DIR" on top of "/usr/bin/autogit" to the desired location. +# +# To use autogit, this file needs to be changed according to the preferred Github, # Gitlab or AUR source which is containing the PKGBUILD for the application you -# want to build. The application names are stored in the reponames folder and -# need to be set manually in the provided example files, each file belongs to a -# GITHUBSOURCE.. setting inside this conf file. +# want to build. +# +# The application names are stored in the "reponames" folder and +# need to be set manually in the provided example files. Each file belongs to a +# "*SOURCE*" setting inside this configuration file and can be changed. # In sum 13 different sources can be enabled and will be updated together, # 6 Github, 6 Gitlab and 1 AUR source. # This is useful if you want to update different repos with each repo having a -# seperate binary folder. For example: core, extra, community +# separate binary folder. For example: core, extra, community... +# # Use the options by uncommenting SETGITHUBREPO etc. in the settings below for # each source. # Autogit can be run either in a loop with a timer or as a single run. +# +# Use "autogit -h" for more options to maintain packages in a fzf-UI. # -# The Settings are described below +# The settings are described below: # # -----------------------| # Local configuration file update check: # This check is required to automatically inform about upstream "autogit.conf" # changes on package updates, that need to be merged with the local configuration. -# This is the default behaviour for easy access to the configuration file. -# A alternative would be to delete this file and use "/etc/autogit/autogit.conf" -# instead, which if changed could be merged with a ".pacnew" file on package updates. +# This is the default behavior for easy access to the configuration file. +# +# A alternative would be to delete this file in "~/autogit" and "~/.config/autogit", +# to use the "/etc/autogit/autogit.conf" instead which - +# if changed could be merged with a ".pacnew" file on package updates. # Please only change this setting when merging a new configuration or when prompted! -CONFVER=1.7.3 +# +CONFVER=1.8.5 # # -----------------------| -# Set default update method +# Set default update method: # There are 2 available modes to check for updates. # # 1 = Fast Check: Compare "pkgver"+"pkgrel" and "sha512sums" of PKGBUILD's via "curl". @@ -39,30 +50,29 @@ CONFVER=1.7.3 UPDCHECK=1 # # -----------------------| -# Set default build method -# -# Default manjaro-chrootbuild command for unstable, -# edit the options and select "var=4" below to use it -# Default = chrootbuild -b unstable -c -p +# Set default build method: +# +# Arch "devtools" - Convenience way option: +# https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot#Convenience_way +# The first argument starts with one of the supported build scripts ("extra-x86_64-build" "multilib-build") etc. +# Edit the options and select "var=3" below to use it. +MBARG1=multilib-build +MBARG2=-c +MBARG3= +MBARG4= +# +# Default Manjaro "chrootbuild" command for unstable, +# edit the options and select "var=2" below to use it. +# Default = "chrootbuild -b unstable -c -p" MCARG1=-b MCARG2=unstable -MCARG3=-cm -MCARG4=-nx -MCARG5=-p -MCARG6= -# -# Default Buildpkg command for unstable, -# edit the options and select "var=3" below to use it -# Default = buildpkg -b unstable -cws -a x86_64 -p -ARG1=-b -ARG2=unstable -ARG3=-cws -ARG4=-a -ARG5=multilib -ARG6=-p -# -# Default Makepkg command, edit the options and select "var=0" below to use it -# Default = makepkg -s -r -c +MCARG3=-c +MCARG4=-m +MCARG5=-H +MCARG6=-p +# +# Default "makepkg" command, edit the options and select "var=1" below to use it. +# Default = "makepkg -s -r -c" MARG1=-s MARG2=-r MARG3=-c @@ -70,26 +80,27 @@ MARG4=--noconfirm MARG5= MARG6= # -# 4 = chrootbuild -b unstable -c -p (manjaro-chrootbuild) #Customizeable -# 3 = buildpkg -b unstable -c -p (Manjaro buildpkg) #Customizeable -# 2 = makepkg -srci (makepkg with installation) -# 1 = buildpkg -c -p (Manjaro buildpkg in clean chroot on stable branch) -# 0 = makepkg -src (makepkg only building) #Customizeable -var=0 +# Options: +# 3 = Arch "devtools" - Convenience way option #Customizeable +# 2 = Manjaro "chrootbuild" #Customizeable +# 1 = makepkg -src (makepkg only building) #Customizeable +# 0 = makepkg -srci (makepkg with installation) +# +var=1 # # -----------------------| # Timer setting in seconds for the auto mode below timer=600 # # -----------------------| -# 1= Run the script in a loop with the above timer setting -# 2= Run the script manually +# 1 = Run the script in a loop with the above timer setting +# 2 = Run the script manually mode=2 # # -----------------------| -# Local pacman repository database file generation and update via "repo-add" -# 0=off -# 1=on +# Local Pacman repository database file generation and update via "repo-add" +# 0 = Off +# 1 = On REPOADD=0 # # -----------------------| @@ -99,6 +110,7 @@ REPOADD=0 # Configure the URL for Github master branch # Uncomment to SETGITHUBREPO=1 to enable this function #SETGITHUBREPO=1 + # This is the default URL for "git clone" # GITHUBCLONEURLC=https://github.com/ GITHUBCLONEURLC=https://github.com/ @@ -115,7 +127,7 @@ BRANCH=master GITHUBBINARY=repo # # Reponames config files -GITHUBSOURCE=$HOME/autogit/reponames/github1 +GITHUBSOURCE=$DIR/reponames/github1 # # -----------------------| ##################### @@ -124,6 +136,7 @@ GITHUBSOURCE=$HOME/autogit/reponames/github1 # Configure the URL for Github extra repo # Uncomment to SETCUSTGITHUBREPO=1 to enable this function #SETCUSTGITHUBREPO=1 + # This is the default URL for "git clone" # GITHUBCLONEURLCCUSTOM=https://github.com/ GITHUBCLONEURLCCUSTOM=https://github.com/ @@ -140,7 +153,7 @@ BRANCHCUSTOM=master GITHUBBINARYCUSTOM=githubcustom # # Reponames config files -GITHUBSOURCECUSTOM=$HOME/autogit/reponames/githubcustom +GITHUBSOURCECUSTOM=$DIR/reponames/githubcustom # # -----------------------| ##################### @@ -149,6 +162,7 @@ GITHUBSOURCECUSTOM=$HOME/autogit/reponames/githubcustom # Configure the URL for Github extra repo 2 # Uncomment to SETCUSTGITHUBREPO2=1 to enable this function #SETCUSTGITHUBREPO2=1 + # This is the default URL for "git clone" # GITHUBCLONEURLCCUSTOM2=https://github.com/ GITHUBCLONEURLCCUSTOM2=https://github.com/ @@ -165,7 +179,7 @@ BRANCHCUSTOM2=master GITHUBBINARYCUSTOM2=githubcustom2 # # Reponames config files -GITHUBSOURCECUSTOM2=$HOME/autogit/reponames/githubcustom2 +GITHUBSOURCECUSTOM2=$DIR/reponames/githubcustom2 # # -----------------------| ##################### @@ -174,6 +188,7 @@ GITHUBSOURCECUSTOM2=$HOME/autogit/reponames/githubcustom2 # Configure the URL for Github extra repo 3 # Uncomment to SETCUSTGITHUBREPO3=1 to enable this function #SETCUSTGITHUBREPO3=1 + # This is the default URL for "git clone" # GITHUBCLONEURLCCUSTOM3=https://github.com/ GITHUBCLONEURLCCUSTOM3=https://github.com/ @@ -190,7 +205,7 @@ BRANCHCUSTOM3=master GITHUBBINARYCUSTOM3=githubcustom3 # # Reponames config files -GITHUBSOURCECUSTOM3=$HOME/autogit/reponames/githubcustom3 +GITHUBSOURCECUSTOM3=$DIR/reponames/githubcustom3 # # -----------------------| ##################### @@ -199,6 +214,7 @@ GITHUBSOURCECUSTOM3=$HOME/autogit/reponames/githubcustom3 # Configure the URL for Github extra repo 4 # Uncomment to SETCUSTGITHUBREPO4=1 to enable this function #SETCUSTGITHUBREPO4=1 + # This is the default URL for "git clone" # GITHUBCLONEURLCCUSTOM4=https://github.com/ GITHUBCLONEURLCCUSTOM4=https://github.com/ @@ -215,7 +231,7 @@ BRANCHCUSTOM4=master GITHUBBINARYCUSTOM4=githubcustom4 # # Reponames config files -GITHUBSOURCECUSTOM4=$HOME/autogit/reponames/githubcustom4 +GITHUBSOURCECUSTOM4=$DIR/reponames/githubcustom4 # # -----------------------| ##################### @@ -224,6 +240,7 @@ GITHUBSOURCECUSTOM4=$HOME/autogit/reponames/githubcustom4 # Configure the URL for Github extra repo 5 # Uncomment to SETCUSTGITHUBREPO5=1 to enable this function #SETCUSTGITHUBREPO5=1 + # This is the default URL for "git clone" # GITHUBCLONEURLCCUSTOM5=https://github.com/ GITHUBCLONEURLCCUSTOM5=https://github.com/ @@ -240,7 +257,7 @@ BRANCHCUSTOM5=master GITHUBBINARYCUSTOM5=githubcustom5 # # Reponames config files -GITHUBSOURCECUSTOM5=$HOME/autogit/reponames/githubcustom5 +GITHUBSOURCECUSTOM5=$DIR/reponames/githubcustom5 # # -----------------------| ##################### @@ -249,6 +266,7 @@ GITHUBSOURCECUSTOM5=$HOME/autogit/reponames/githubcustom5 # Configure the URL for Gitlab # Uncomment to SETGITLABREPO=1 to enable this function #SETGITLABREPO=1 + # This is the default URL for "git clone" # GITLABCLONEURL=https://gitlab.manjaro.org/ GITLABCLONEURL=https://gitlab.manjaro.org/ @@ -265,7 +283,7 @@ BRANCHGITLAB=master GITLABBINARY=core # # Reponames config files -GITLABSOURCE=$HOME/autogit/reponames/gitlab-core +GITLABSOURCE=$DIR/reponames/gitlab-core # # -----------------------| ##################### @@ -274,6 +292,7 @@ GITLABSOURCE=$HOME/autogit/reponames/gitlab-core # Configure the URL for Gitlab extra repo # Uncomment to SETGITLABREPOCUSTOM=1 to enable this function #SETGITLABREPOCUSTOM=1 + # This is the default URL for "git clone" # GITLABCLONEURLCUSTOM=https://gitlab.manjaro.org/ GITLABCLONEURLCUSTOM=https://gitlab.manjaro.org/ @@ -290,7 +309,7 @@ BRANCHGITLABCUSTOM=master GITLABBINARYCUSTOM=extra # # Reponames config files -GITLABSOURCECUSTOM=$HOME/autogit/reponames/gitlab-extra +GITLABSOURCECUSTOM=$DIR/reponames/gitlab-extra # # -----------------------| ##################### @@ -299,6 +318,7 @@ GITLABSOURCECUSTOM=$HOME/autogit/reponames/gitlab-extra # Configure the URL for Gitlab extra repo 2 # Uncomment to SETGITLABREPOCUSTOM2=1 to enable this function #SETGITLABREPOCUSTOM2=1 + # This is the default URL for "git clone" # GITLABCLONEURLCUSTOM2=https://gitlab.manjaro.org/ GITLABCLONEURLCUSTOM2=https://gitlab.manjaro.org/ @@ -315,7 +335,7 @@ BRANCHGITLABCUSTOM2=master GITLABBINARYCUSTOM2=community # # Reponames config files -GITLABSOURCECUSTOM2=$HOME/autogit/reponames/gitlab-community +GITLABSOURCECUSTOM2=$DIR/reponames/gitlab-community # # -----------------------| ##################### @@ -324,6 +344,7 @@ GITLABSOURCECUSTOM2=$HOME/autogit/reponames/gitlab-community # Configure the URL for Gitlab extra repo 3 # Uncomment to SETGITLABREPOCUSTOM3=1 to enable this function #SETGITLABREPOCUSTOM3=1 + # This is the default URL for "git clone" # GITLABCLONEURLCUSTOM3=https://gitlab.manjaro.org/ GITLABCLONEURLCUSTOM3=https://gitlab.manjaro.org/ @@ -340,7 +361,7 @@ BRANCHGITLABCUSTOM3=master GITLABBINARYCUSTOM3=multilib # # Reponames config files -GITLABSOURCECUSTOM3=$HOME/autogit/reponames/gitlab-multilib +GITLABSOURCECUSTOM3=$DIR/reponames/gitlab-multilib # # -----------------------| ##################### @@ -349,6 +370,7 @@ GITLABSOURCECUSTOM3=$HOME/autogit/reponames/gitlab-multilib # Configure the URL for Gitlab extra repo 4 # Uncomment to SETGITLABREPOCUSTOM4=1 to enable this function #SETGITLABREPOCUSTOM4=1 + # This is the default URL for "git clone" # GITLABCLONEURLCUSTOM4=https://gitlab.manjaro.org/ GITLABCLONEURLCUSTOM4=https://gitlab.manjaro.org/ @@ -365,7 +387,7 @@ BRANCHGITLABCUSTOM4=master GITLABBINARYCUSTOM4=kde-unstable # # Reponames config files -GITLABSOURCECUSTOM4=$HOME/autogit/reponames/gitlab-kde-unstable +GITLABSOURCECUSTOM4=$DIR/reponames/gitlab-kde-unstable # # -----------------------| ##################### @@ -374,6 +396,7 @@ GITLABSOURCECUSTOM4=$HOME/autogit/reponames/gitlab-kde-unstable # Configure the URL for Gitlab extra repo 5 # Uncomment to SETGITLABREPOCUSTOM5=1 to enable this function #SETGITLABREPOCUSTOM5=1 + # This is the default URL for "git clone" # GITLABCLONEURLCUSTOM5=https://gitlab.manjaro.org/ GITLABCLONEURLCUSTOM5=https://gitlab.manjaro.org/ @@ -390,7 +413,7 @@ BRANCHGITLABCUSTOM5=master GITLABBINARYCUSTOM5=temp # # Reponames config files -GITLABSOURCECUSTOM5=$HOME/autogit/reponames/gitlab-temp +GITLABSOURCECUSTOM5=$DIR/reponames/gitlab-temp # # -----------------------| ################ @@ -408,6 +431,6 @@ AURURL=https://aur.archlinux.org/ AURBINARY=aur # # Reponames config files -AURSOURCE=$HOME/autogit/reponames/aur +AURSOURCE=$DIR/reponames/aur # # -----------------------| diff --git a/reponames/aur b/reponames/aur index a6097c8..0536fdc 100644 --- a/reponames/aur +++ b/reponames/aur @@ -1,2 +1,5 @@ -google-chrome -yaru +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#yaru +#oh-my-zsh-git \ No newline at end of file diff --git a/reponames/github1 b/reponames/github1 index cf2edcf..aed4fae 100644 --- a/reponames/github1 +++ b/reponames/github1 @@ -1,6 +1,8 @@ -excalibur1234/pacui -puxplaying/autogit -puxplaying/manjaro-update -puxplaying/toolbox -puxplaying/mutter-x11-scaling -puxplaying/gnome-software-snap +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#excalibur1234/pacui +#puxplaying/autogit +#puxplaying/manjaro-update +#puxplaying/toolbox +#puxplaying/mutter-x11-scaling \ No newline at end of file diff --git a/reponames/githubcustom b/reponames/githubcustom index b193c1d..28f83e7 100644 --- a/reponames/githubcustom +++ b/reponames/githubcustom @@ -1 +1,4 @@ -excalibur1234/pacui +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#excalibur1234/pacui \ No newline at end of file diff --git a/reponames/githubcustom2 b/reponames/githubcustom2 index b193c1d..28f83e7 100644 --- a/reponames/githubcustom2 +++ b/reponames/githubcustom2 @@ -1 +1,4 @@ -excalibur1234/pacui +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#excalibur1234/pacui \ No newline at end of file diff --git a/reponames/githubcustom3 b/reponames/githubcustom3 index b193c1d..28f83e7 100644 --- a/reponames/githubcustom3 +++ b/reponames/githubcustom3 @@ -1 +1,4 @@ -excalibur1234/pacui +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#excalibur1234/pacui \ No newline at end of file diff --git a/reponames/githubcustom4 b/reponames/githubcustom4 index b193c1d..28f83e7 100644 --- a/reponames/githubcustom4 +++ b/reponames/githubcustom4 @@ -1 +1,4 @@ -excalibur1234/pacui +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#excalibur1234/pacui \ No newline at end of file diff --git a/reponames/githubcustom5 b/reponames/githubcustom5 index b193c1d..28f83e7 100644 --- a/reponames/githubcustom5 +++ b/reponames/githubcustom5 @@ -1 +1,4 @@ -excalibur1234/pacui +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#excalibur1234/pacui \ No newline at end of file diff --git a/reponames/gitlab-community b/reponames/gitlab-community index dd3496d..4ef4ae9 100644 --- a/reponames/gitlab-community +++ b/reponames/gitlab-community @@ -1 +1,4 @@ -packages/community/gamemode +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#packages/community/gamemode diff --git a/reponames/gitlab-core b/reponames/gitlab-core index 4df7240..08a5116 100644 --- a/reponames/gitlab-core +++ b/reponames/gitlab-core @@ -1 +1,4 @@ -packages/core/mhwd +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#packages/core/mhwd diff --git a/reponames/gitlab-extra b/reponames/gitlab-extra index ab72331..4adc595 100644 --- a/reponames/gitlab-extra +++ b/reponames/gitlab-extra @@ -1 +1,4 @@ -packages/extra/conky +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#packages/extra/conky diff --git a/reponames/gitlab-kde-unstable b/reponames/gitlab-kde-unstable index e47c1b2..cdb56c7 100644 --- a/reponames/gitlab-kde-unstable +++ b/reponames/gitlab-kde-unstable @@ -1 +1,4 @@ -packages/kde-unstable/libraries-git/plasma-wayland-protocols-git +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#packages/kde-unstable/libraries-git/plasma-wayland-protocols-git diff --git a/reponames/gitlab-multilib b/reponames/gitlab-multilib index 6f69919..94c000e 100644 --- a/reponames/gitlab-multilib +++ b/reponames/gitlab-multilib @@ -1 +1,4 @@ -packages/multilib/steam-manjaro +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#packages/multilib/steam-manjaro diff --git a/reponames/gitlab-temp b/reponames/gitlab-temp index 0442ab4..5f4c3cd 100644 --- a/reponames/gitlab-temp +++ b/reponames/gitlab-temp @@ -1 +1,4 @@ -packages/temp/qt5-webengine +# Commenting with '#' is allowed to ignore applications. +# Use one application per line and place optional dependencies before the final package. +# Example: +#packages/temp/qt5-webengine