diff options
author | FivePixels <o5pxels@gmail.com> | 2018-03-22 21:12:58 -0500 |
---|---|---|
committer | FivePixels <o5pxels@gmail.com> | 2018-03-22 21:12:58 -0500 |
commit | beabeaf52fcd537c61f994c140de5e710e902e27 (patch) | |
tree | 9716eed3ef0999083af604dc6e29800ff2e06fd9 /cydia/repo | |
parent | 3db4dc9ef67b6635cad23020ff18bdf7f30f6fe0 (diff) | |
download | personal-website-beabeaf52fcd537c61f994c140de5e710e902e27.tar.xz personal-website-beabeaf52fcd537c61f994c140de5e710e902e27.zip |
commit
Diffstat (limited to 'cydia/repo')
-rwxr-xr-x | cydia/repo | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/cydia/repo b/cydia/repo new file mode 100755 index 0000000..de348ba --- /dev/null +++ b/cydia/repo @@ -0,0 +1,53 @@ +#!/bin/bash + +script_dir=$(dirname $0) +cur=$(pwd) + +cd "$script_dir" +if [ $# -eq 0 ]; then + echo "Usage: $0 <command>" >&2 + exit 1 +fi + +if [ "$1" == "add" ]; then + if [ "$#" -ne 3 ]; then + echo "Usage: $0 add <package> <deb file>" >&2 + exit 1 + fi + echo "Adding new package..."; + + cp "$3" "$script_dir/debs/$2.deb" + +elif [ "$1" == "update" ]; then + echo "Updating packaging..."; +else + echo "Usage: $0 <command>" >&2 + exit 1 +fi + +rm Packages.bz2 +rm Packages + +for deb in debs/*.deb +do + echo "Processing $deb..."; + dpkg-deb -f "$deb" >> Packages + md5sum "$deb" | echo "MD5sum: $(awk '{ print $1 }')" >> Packages + wc -c "$deb" | echo "Size: $(awk '{ print $1 }')" >> Packages + echo "Filename: $deb" >> Packages + dpkg-deb -f "$deb" Package | echo "Depiction: http://$(head -n 1 CNAME)/depictions/?p=$(xargs -0)" >> Packages + echo "" >> Packages +done + +echo "" >> Packages; ## Add extra new line + +bzip2 -9c < Packages > Packages.bz2 +gzip -9c < Packages > Packages.gz + +git add -A +now=$(date +"%I:%M %m-%d-%Y") +git commit -am "Packages Update - $now" +git push + +echo "Updated Github repository with latest packages"; +cd "$cur"
\ No newline at end of file |