-
Notifications
You must be signed in to change notification settings - Fork 0
3. Installation
Following commands are performed in BASH.
Download latest released version of script in terminal into /tmp
directory. You can check it from https://github.com/reddy75/wrecon/releases.
For example, the latest version is v1.02
, and we want archive type tar.gz
cd /tmp
BASE_NAME=reddy75/wrecon
BASE_URL=https://github.com/${BASE_NAME}/archive
API_URL=https://api.github.com/repos/${BASE_NAME}/releases/latest
LATEST_VERSION=$(curl --silent "${API_URL}" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
ARCHIVE_FILE=${LATEST_VERSION}.tar.gz
WRECON_DIR="wrecon-${LATEST_VERSION#*v}"
DOWNLOAD_URL=${BASE_URL}/${ARCHIVE_FILE}; echo "SCRIPT DOWNLOAD FROM : ${DOWNLOAD_URL}"
wget ${DOWNLOAD_URL}
Extract archive by command
tar -xvf ${ARCHIVE_FILE}
and output will be similar like
wrecon-1.02/
wrecon-1.02/README.txt
wrecon-1.02/gpl-3.0.txt
wrecon-1.02/wrecon.py
wrecon-1.02/wrecon.py.sig
Then go into wrecon-1.02
directory,
cd ${WRECON_DIR}/
To verify the script code is signed by author (using by gpg), you ensure by command(s)
gpg --verify wrecon.py.sig
or
gpg --verify wrecon.py.sig wrecon.py
When you see last line like 'gpg: Good signature from...
', then script is prepared for copy into your weechat.
Configuration for user of weechat is usually located in default directory ${HOME}/.weechat/
. This may be different based on your setup of system, or installation of weechat. You need copy script into python subdirectory of weechat, usually by command
cp wrecon.py ${HOME}/.weechat/python/
If copy was successful then all is prepared.
You can also ensure script can be loaded automatically when weechat is started, then follow last step (making a link for autoload)
ln -s ${HOME}/.weechat/python/wrecon.py ${HOME}/.weechat/python/autoload/wrecon.py