copytabaslink's Introduction
#!/bin/bash # variables ID="copyTabAsLink" 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" # 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/"
copytabaslink's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.