-
Notifications
You must be signed in to change notification settings - Fork 0
GrzegorzDrozd/handleWith
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
#!/bin/bash # variables ID="handleWith" BRANCH="main" # check requirements MISSING_REQ=0 for req in mktemp wget unzip zip grep cut date;do type $req >/dev/null 2>&1 || { echo >&2 "Missing dependency: $req"; MISSING_REQ=1; } done [ $MISSING_REQ -ne 0 ] && { echo "Aborting because of missing dependency"; exit 1; } # create tmp storage ZIPFILE=$(mktemp) EXTRDIR=$(mktemp -d) # download latest source wget -q --show-progress "https://github.com/igorlogius/$ID/archive/$BRANCH.zip" -O $ZIPFILE # extract without paths and README unzip -j $ZIPFILE -d $EXTRDIR -x "*/README" "*/handleWith.sh" "*/handleWith.py" "*/handleWith.bat" "*/handleWith.js" # re-pack as xpi (zip) without paths and extended file attributes XPI="$ID-$(grep '"version"' $EXTRDIR/manifest.json |cut -d'"' -f4)-$(date '+%F_%T').xpi" zip -X -j $XPI $EXTRDIR/* # remove tmp storage rm -f $EXTRDIR/* && rmdir $EXTRDIR/ # show content of xpi unzip -l $XPI echo "Homepage: https://addons.mozilla.org/en-US/firefox/addon/$ID"
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published