Skip to content

Commit

Permalink
version 5.5-7
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinlyonsrepo committed Dec 3, 2018
1 parent a5a0621 commit 34ccfad
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 71 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ of the repository.
>
> gdriveDest1="foo123456789"
>
> gdriveDest2="foo125656789"
> gdriveDest2="foo129656789"
>
> gdriveDest3="foo123666689"
>
Expand Down Expand Up @@ -338,6 +338,8 @@ folder, see "see also" section.
* trizen statistics display page
* Remove foreign packages menu
* Read AUR Package comments
* Display the AUR packages maintained by a given user
* Display the PKGBUILD of a given AUR package


* Full System update
Expand Down Expand Up @@ -458,12 +460,12 @@ See Also
-----------
(REF1): Packages files list referenced above at marker REF1 can be viewed
in package_lists.md, which is in the sub-folder documentation of repository.
The package files list is a collection of 25 lists describing the system.
The package files list is a collection of 26 lists describing the system.

There are 6 screenshots in the repository screenshot folder


In the repository documentation folder, there are various support documents.
In the repository [documentation](documentation) folder, there are various support documents.

| File Name | description |
| ------ | ------ |
Expand Down
8 changes: 8 additions & 0 deletions documentation/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,11 @@
### Version 5.4-6 280618
* Minor Mini update
* optdepends lostfiles moved from AUR to community , changing documentation and SW to reflect.

### Version 5.5-7 031218
* package list generator size increased from 25 to 26
* added package list help file to install and added it to help display.
* Two new trizen options added
* Multilib repo size calculation bug corrected on system help page
(only appeared if mutlilib was both enabled and empty)
* Various minor optimisations.
4 changes: 3 additions & 1 deletion documentation/cylon.7
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ Cylon information page option in menu or -h includes depends
installation check.
This manpage is a TRUNCATED version of the readme.md file.
Readme.md for FULL detailed list of menu options and functions
is displayed on cylon information page which is launched from menu or -h option
is displayed by -h option.
The Readme.md and the Packages files list generator help file can also
be accessed from the cylon information page which is launched from menu option.

.SH REPORTING BUGS
If you should find a bug or any other query ,
Expand Down
12 changes: 7 additions & 5 deletions documentation/package_lists.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Packages files list generator.
-------------

The package files list generator provides a snapshot of system by producing a group of 24 files
The package files list generator provides a snapshot of system by producing a group of 26 files
which describe the system.
These lists can be very useful, for example:
Reporting bugs, discussing installed packages, maintenance
Expand Down Expand Up @@ -34,8 +34,9 @@ The "pkglistFunc" is called at various places in program see (REF1) marker in re
| 21 | All packages in repository multilib | pkgMulib.txt |
| 22 | All installed packages sorted by original install date | pkginstall.txt |
| 23 | All development/unstable packages(cvs svn git hg bzr darcs) | pkgdevel.txt |
| 24 | All foreign packages not in the AUR | pkgFNotAUR.txt |
| 25 | System packages information summary | pkginfo.txt |
| 24 | All flatpak packages installed | pkgFlatpak.txt |
| 25 | All foreign packages not in the AUR | pkgFNotAUR.txt |
| 26 | System packages information summary | pkginfo.txt |


### Commands used by index number in table.
Expand Down Expand Up @@ -64,5 +65,6 @@ The "pkglistFunc" is called at various places in program see (REF1) marker in re
21. paclist multilib
22. sed -n "/ installed "x" /{s/].*/]/p;q}" /var/log/pacman.log NOTE: "x" = array containing pacman -Qq
23. pacman -Qq | awk '/^.+(-cvs|-svn|-git|-hg|-bzr|-darcs)$/'
24. Multiple commands uses Auracle and connects to the internet
25. wc -l ./*.txt | head -n -1 | sort
24. flatpak list
25. Multiple commands uses Auracle and connects to the internet.
26. wc -l ./*.txt | head -n -1 | sort
4 changes: 2 additions & 2 deletions main/Cylon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#Description: Updates, maintenance, backups and system checks in
#single menu driven optional script Command line program for Arch linx users.
#see readme.md(access thru cylon info page) or manpage "man cylon" for info.
#See changelog.md at repo for version control v5.1-3
#See changelog.md at repo for version control
#License: see license.md
#Written by Gavin lyons
#Software repo: https://github.com/gavinlyonsrepo/cylon
Expand Down Expand Up @@ -67,7 +67,7 @@ fi

DEST6="/usr/share/doc/cylon"
DEST7="/usr/lib/cylon/modules/"
#DEST7="../modules/" # DEVELOPMENT PATH
#DEST7="../modules/" # DEVELOPMENT TESTING PATH ONLY
mkdir -p "$DEST3"
mkdir -p "$DEST5"

Expand Down
8 changes: 4 additions & 4 deletions modules/Auracle_module
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ local optionsCArr=("Check network and check for AUR updates (no download), aurac
if msgFunc yesno
then #yes
msgFunc norm "Installing package $auraclePacVar"
makepkg -si
makepkg -si
fi
;;

Expand All @@ -93,8 +93,8 @@ local optionsCArr=("Check network and check for AUR updates (no download), aurac
makeDirFunc "-AURDOWNLOAD"
#build and install packages
msgFunc norm "Type a AUR package name:-"
read -r auraclePacVar
auracle -r download "$auraclePacVar" || return
read -r auraclePacVar
auracle -r download "$auraclePacVar" || return
msgFunc anykey
;;

Expand Down Expand Up @@ -175,7 +175,7 @@ function aurupdateFunc
msgFunc green "Update AUR packages auracle sync and download "
#make auracle update directory
makeDirFunc "-AURUPDATES"
auracle sync | awk '{ print $1 }' | xargs auracle download
auracle sync | awk '{ print $1 }' | xargs auracle -r download

# look for empty dir (i.e. if no updates)
#check directory has child directories?
Expand Down
30 changes: 24 additions & 6 deletions modules/Misc_module
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,14 @@ function exitHandlerFunc
Badinput)
msgFunc red "$2 is an INVALID USER OPTION!"
msgFunc yellow "Usage: -b -c -d -h -l -m -n -p -r -s -u -v -z"
msgFunc yellow "type cylon -h for readme or man cylon for manpage at terminal"
msgFunc anykey "to view option details"
man cylon | grep -A39 OPTIONS
msgFunc yellow "Type cylon -h for display readme.md or"
msgFunc yellow "Type man cylon for manpage"
msgFunc norm " "
msgFunc norm "Do you wish to view man page section for user options now? [y/n]"
if msgFunc yesno
then # yes
man cylon | grep -A39 OPTIONS
fi
;;
*) msgFunc yellow "Unknown input to error handler";;
esac
Expand Down Expand Up @@ -244,17 +249,30 @@ clear
fi
done

msgFunc green "Do you want to view readme [y/n] ?"
msgFunc green "Do you want to view readme file [y/n] ?"
if msgFunc yesno
then #yes
msgFunc line
msgFunc green "Displaying cylonReadme.md file at $DEST6"
msgFunc green "Displaying cylon Readme.md file at $DEST6"
cd "$DEST6" || exitHandlerFunc DEST6
less Readme.md
msgFunc green "Done!"
msgFunc line
msgFunc anykey
fi
msgFunc norm " "

msgFunc green "Do you want to view Packages files list generator help file [y/n] ?"
if msgFunc yesno
then #yes
msgFunc line
msgFunc green "Displaying package_lists.md file at $DEST6"
cd "$DEST6" || exitHandlerFunc DEST6
less package_lists.md
msgFunc green "Done!"
msgFunc line
msgFunc anykey
fi
clear
return
fi
Expand Down Expand Up @@ -335,7 +353,7 @@ then
msgFunc norm "Core: $(pacman -Qi $(paclist core | awk '{print $1}' ) | awk '/Installed Size/ {if ($5=="MiB") {sum+=$4} else if ($5=="KiB") {sum+=($4/1024)}} END {print sum " MiB"}')"
msgFunc norm "Extra: $(pacman -Qi $(paclist extra | awk '{print $1}' ) | awk '/Installed Size/ {if ($5=="MiB") {sum+=$4} else if ($5=="KiB") {sum+=($4/1024)}} END {print sum " MiB"}')"
msgFunc norm "Community: $(pacman -Qi $(paclist community | awk '{print $1}' ) | awk '/Installed Size/ {if ($5=="MiB") {sum+=$4} else if ($5=="KiB") {sum+=($4/1024)}} END {print sum " MiB"}')"
if [ -z "$paclist multilib" ]
if [ "$(paclist multilib | wc -l)" != "0" ]
then
msgFunc norm "Multilib: $(pacman -Qi $(paclist multilib | awk '{print $1}' ) | awk '/Installed Size/ {if ($5=="MiB") {sum+=$4} else if ($5=="KiB") {sum+=($4/1024)}} END {print sum " MiB"}')"
fi
Expand Down
85 changes: 45 additions & 40 deletions modules/Pacman_module
Original file line number Diff line number Diff line change
Expand Up @@ -263,75 +263,75 @@ function pkglistFunc
makeDirFunc "-PKGINFO"
fi

msgFunc norm "All .pacnew and .pacsave files : pacNewSaveFiles.txt" #1
msgFunc norm "1: All .pacnew and .pacsave files : pacNewSaveFiles.txt" #1
find / -path /run/media -prune -o -path /mnt -prune -o -regextype posix-extended -regex ".+\.pac(new|save)" \
-fprint pacNewSaveFiles.txt -exec echo -n "." \; 2> /dev/null
msgFunc norm " "

msgFunc norm "All installed packages: pkgQ.txt" #2
msgFunc norm "2: All installed packages: pkgQ.txt" #2
pacman -Q > pkgQ.txt

msgFunc norm "All native packages: pkgQn.txt" #3
msgFunc norm "3: All native packages: pkgQn.txt" #3
pacman -Qn > pkgQn.txt

msgFunc norm "All explicitly installed packages: pkgQe.txt" #4
msgFunc norm "4: All explicitly installed packages: pkgQe.txt" #4
pacman -Qe > pkgQe.txt

msgFunc norm "All explicitly installed native packages that are" #5
msgFunc norm "5: All explicitly installed native packages that are" #5
msgFunc norm "not direct or optional dependencies: pkgQent.txt"
pacman -Qent > pkgQent.txt

msgFunc norm "All foreign installed packages: pkgQm.txt" #6
msgFunc norm "6: All foreign installed packages: pkgQm.txt" #6
pacman -Qm > pkgQm.txt

msgFunc norm "All foreign explicitly installed packages: pkgQme.txt" #7
msgFunc norm "7: All foreign explicitly installed packages: pkgQme.txt" #7
pacman -Qme > pkgQme.txt

msgFunc norm "All orphan packages not required as dependencies: pkgOpn.txt"
msgFunc norm "8: All orphan packages not required as dependencies: pkgOpn.txt"
pacman -Qtdq > pkgOpn.txt #8

msgFunc norm "All modified by user system backup files : pkgSysBck.txt"
msgFunc norm "9: All modified by user system backup files : pkgSysBck.txt"
pacman -Qii | awk '/^MODIFIED/ {print $2}' > pkgSysBck.txt #9

msgFunc norm "All packages installed as dependencies : pkgQd.txt"
msgFunc norm "10: All packages installed as dependencies : pkgQd.txt"
pacman -Qd > pkgQd.txt #10

msgFunc norm "All explicitly installed native packages "
msgFunc norm "11: All explicitly installed native packages "
msgFunc norm "quiet output for system restore : pkgQqne.txt"
pacman -Qqne > pkgQqne.txt #11

msgFunc norm "All packages that are optional dependencies "
msgFunc norm "12: All packages that are optional dependencies "
msgFunc norm "and not installed explicitly :pkgOptdep.txt"
comm -13 <(pacman -Qdtq | sort) <(pacman -Qdttq | sort) > pkgOptdep.txt #12

#expac
msgFunc norm "All explicitly installed packages not in base nor base-devel with size"
msgFunc norm "13: All explicitly installed packages not in base nor base-devel with size"
msgFunc norm "and description: pkgNonBase.txt"
expac -H M "%011m\t%-20n\t%10d" $(comm -23 <(pacman -Qqen | sort) <(pacman -Qqg base base-devel | sort))\
| sort -hr > pkgNonBase.txt #13

msgFunc norm "All explicitly installed packages that are not direct or optional dependencies"
msgFunc norm "14: All explicitly installed packages that are not direct or optional dependencies"
msgFunc norm "and not in base nor base-devel with size and description: pkgexpNonBase.txt"
expac -H M "%011m\t%-20n\t%10d" $(comm -23 <(pacman -Qqent | sort) <(pacman -Qqg base base-devel | sort))\
| sort -hr > pkgexpNonBase.txt #14

msgFunc norm "All installed packages sorted by size: pkgSize.txt"
msgFunc norm "15: All installed packages sorted by size: pkgSize.txt"
expac -H M '%m\t%n' | sort -hr > pkgSize.txt #15

msgFunc norm "All installed packages sorted by install/update date: pkgDate.txt"
msgFunc norm "16: All installed packages sorted by install/update date: pkgDate.txt"
expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort -hr > pkgDate.txt #16

msgFunc norm "All installed groups: pkgGroups.txt"
msgFunc norm "17: All installed groups: pkgGroups.txt"
expac -g '%G' | sort -u > pkgGroups.txt #17

#paclist
msgFunc norm "Packages by repositories:-"
msgFunc norm "Core: $(paclist core > pkgCore.txt ) : pkgCore.txt" #18
msgFunc norm "Extra: $(paclist extra > pkgExtra.txt ) : pkgExtra.txt" #19
msgFunc norm "Community: $(paclist community > pkgComm.txt ) : pkgComm.txt" #20
msgFunc norm "Multilib: $(paclist multilib > pkgMulib.txt ): pkgMulib.txt" #21
msgFunc norm "18: Core: $(paclist core > pkgCore.txt ) : pkgCore.txt" #18
msgFunc norm "19: Extra: $(paclist extra > pkgExtra.txt ) : pkgExtra.txt" #19
msgFunc norm "20: Community: $(paclist community > pkgComm.txt ) : pkgComm.txt" #20
msgFunc norm "21: Multilib: $(paclist multilib > pkgMulib.txt ): pkgMulib.txt" #21

msgFunc norm "All installed packages sorted by very first install date: pkginstall.txt" #22
msgFunc norm "22: All installed packages sorted by very first install date: pkginstall.txt" #22
local pacQArr
pacQArr=$(pacman -Qq)
IFS=$'\n' pacQArr=($(sort <<<"${pacQArr[*]}"))
Expand All @@ -348,13 +348,21 @@ function pkglistFunc
sed -n "/ installed ${pacQArr[i]} /{s/].*/]/p;q}" /var/log/pacman.log >> pkginstall.txt
done
echo " "
msgFunc norm "All development/unstable packages(cvs svn git hg bzr darcs) : pkgdevel.txt" #23
msgFunc norm "23: All development/unstable packages(cvs svn git hg bzr darcs) : pkgdevel.txt" #23
pacman -Qq | awk '/^.+(-cvs|-svn|-git|-hg|-bzr|-darcs)$/' >> pkgdevel.txt

if checkPacFunc auracle #24
if checkPacFunc flatpak #24
then
msgFunc norm "24: All flatpak packages installed: pkgFlatpak.txt"
flatpak list > pkgFlatpak.txt
else
msgFunc norm "Skipping list number 24 as flatpak not installed"
fi

if checkPacFunc auracle #25
then
checkNetFunc "aur.archlinux.org"
msgFunc norm "All foreign packages not in the AUR: pkgFNotAUR.txt"
msgFunc norm "25: All foreign packages not in the AUR: pkgFNotAUR.txt"
for p in $(pacman -Qmq); do
if [ -z "$(auracle info "$p")" ]; then
echo -n "."
Expand All @@ -363,15 +371,19 @@ function pkglistFunc
done
echo " "
else
msgFunc norm "Skipping list number 24 as auracle not installed"
msgFunc norm "Skipping list number 25 as auracle not installed"
fi

msgFunc norm "System packages list information summary : pkginfo.txt" #25
msgFunc norm "26: System packages list information summary : pkginfo.txt" #26
{
echo "See https://github.com/gavinlyonsrepo/cylon/blob/master/documentation/package_lists.md for more information"
echo "See https://github.com/gavinlyonsrepo/cylon/blob/master/documentation/package_lists.md"
echo "or cylon information option on main menu for more information."
echo "Line count of package files:"
wc -l ./*txt | head -n -1 | sort
} >> pkginfo.txt

msgFunc norm "Note: Packages files list generator help file can be accessed
via the cylon information menu option on main screen"
}

##FUNCTION HEADER
Expand All @@ -394,13 +406,7 @@ function updateFunc
clear
return
fi
#check if trizen package installed
if ! checkPacFunc trizen
then
msgFunc anykey
clear
return
fi

clear
msgFunc line
AsciiArtFunc "CYLON"
Expand All @@ -411,10 +417,10 @@ function updateFunc
msgFunc anykey
msgFunc line
msgFunc green "Arch-audit upgradable vulnerable packages"
arch-audit -u
msgFunc norm " "
msgFunc green "Arch-audit vulnerable packages"
arch-audit -q
arch-audit -u
if [ -n "${arch-audit -u}" ]; then
msgFunc norm "0"
fi
msgFunc anykey
msgFunc line
msgFunc green "Number of Pacman updates ready ..> "
Expand Down Expand Up @@ -450,7 +456,6 @@ function updateFunc
break
done
msgFunc green "Done!"
msgFunc anykey
}

#FUNCTION HEADER
Expand Down
Loading

0 comments on commit 34ccfad

Please sign in to comment.