Add back the install.sh and fix the checkinstall.
This commit is contained in:
parent
37c53ddbe8
commit
7ce47cae3e
|
|
@ -1,6 +1,28 @@
|
|||
#!/usr/bin/bash
|
||||
cd /var/tmp
|
||||
apt-get install -y neomutt urlscan w3m w3m-img ripmime isync msmtp vdirsyncer pass mailsync libnotify-bin lynx urlview
|
||||
|
||||
|
||||
# isync
|
||||
# msmtp
|
||||
# neomutt
|
||||
# notmuch-runtime
|
||||
# pass
|
||||
# git
|
||||
# abook (optional) – contact store and tab completion
|
||||
# cronie (optional) – auto-sync mails - alt.: fcron
|
||||
# dunst (optional) – enable desktop notifications about new mail
|
||||
# fcron (optional) – auto-sync mails - alt.: cronie
|
||||
# imagemagick (optional) – view images inside of the neomutt TUI
|
||||
# libnotify (optional) – enable desktop notifications about new mail
|
||||
# pam-gnupg (optional) – automatically unlock gpg keys at session login
|
||||
# urlview (optional) – list URLs found in mails to open them in a browser
|
||||
# w3m (optional) – view HTML email and images inside of the neomutt TUI
|
||||
# elinks (optional) – view HTML email inside of the neomutt TUI
|
||||
# links (optional) – view HTML email inside of the neomutt TUI
|
||||
# lynx (optional) – view HTML email inside of the neomutt TUI
|
||||
|
||||
|
||||
set -x
|
||||
apt-get install -y git neomutt urlscan w3m w3m-img ripmime isync msmtp vdirsyncer pass mailsync libnotify-bin lynx urlview
|
||||
|
||||
echo 'alias mutt="neomutt "' >> ~/.zsh_aliases.d/002_neomutt.zsh
|
||||
|
||||
|
|
@ -11,17 +33,85 @@ PRERELEASE=false
|
|||
# RELEASE=$(curl "https://api.github.com/repos/${PROJECT}/releases?per_page=5" | jq -r '.[0] | select( .prerelease = false ) |.tag_name')
|
||||
# VERSION=$(echo "${RELEASE}" | cut -c 2- | cut -f1 -d"-")
|
||||
VERSION=$( date +%Y-%m-%d_ )git
|
||||
DOWNLOAD_DIR=/tmp
|
||||
|
||||
BUILD_DIR=/var/tmp/build_mutt-wizard
|
||||
mkdir -p ${BUILD_DIR}
|
||||
|
||||
# make a containing directory
|
||||
mkdir -p /var/tmp/${BASE_REPO}-"${RELEASE}"
|
||||
cd /var/tmp/${BASE_REPO}-"${RELEASE}" || exit
|
||||
|
||||
cat > ./description-pak << EOF
|
||||
cat > ${BUILD_DIR}/description-pak << EOF
|
||||
A system for automatically configuring mutt and isync with a simple interface and safe passwords
|
||||
EOF
|
||||
|
||||
cat > ./checkinstall_it.sh << 'EOF'
|
||||
## Files and directories to be created:
|
||||
# $HOME/usr/local/share/mutt-wizard/mutt-wizard.muttrc
|
||||
# $HOME/usr/local/share/mutt-wizard/mutt-wizard-colors.muttrc
|
||||
# $HOME/.config/mutt/muttrc
|
||||
# $HOME/.config/mutt/colorschemes/colors-gruvbox-shuber-extended.muttrc
|
||||
# $HOME/.config/mutt/colorschemes/colors-gruvbox-shuber.muttrc
|
||||
# $HOME/.config/mutt/accounts/1-example_profile.muttrc
|
||||
|
||||
cat > ${BUILD_DIR}/checkinstall_it.sh << 'EOF'
|
||||
|
||||
echo "ENTERING CHECKINSTALL"
|
||||
|
||||
BASE_URL='https://api.github.com/repos'
|
||||
BASE_USER='LukeSmithxyz'
|
||||
BASE_REPO='mutt-wizard'
|
||||
LICENSE_PAGE_URL="${BASE_URL}/${BASE_USER}/${BASE_REPO}"/license
|
||||
RELEASES_URL="${BASE_URL}/${BASE_USER}/${BASE_REPO}"/releases
|
||||
|
||||
# CONTENT=$(curl -s ${RELEASES_URL}/latest)
|
||||
# LATEST_URL=$(echo "${CONTENT}" | jq --raw-output '.assets[] | select(.browser_download_url | test("Linux-x86_64")) | .browser_download_url')
|
||||
|
||||
echo "LATEST_URL: " "${LATEST_URL}"
|
||||
|
||||
# RELEASE=$(echo "${CONTENT}" | jq --raw-output '.tag_name')
|
||||
|
||||
# LICENSE_URL=$(curl "${LICENSE_PAGE_URL}" | jq --raw-output '.download_url')
|
||||
# wget -c ${LICENSE_URL}
|
||||
|
||||
VERSION=$( date +%Y-%m-%d_ )git
|
||||
VERSION=1.0
|
||||
RELEASE=git
|
||||
|
||||
# make a new temporary directory for this use
|
||||
BASE_TMP_DIR=~/tmptmp/checkinstall_tmp
|
||||
mkdir -p ${BASE_TMP_DIR}
|
||||
|
||||
# do your work
|
||||
checkinstall -y --fstrans \
|
||||
--pkgname=mutt-wizard \
|
||||
--pkgversion=${VERSION}\
|
||||
--pkgrelease=${RELEASE} \
|
||||
--pkgarch=amd64 \
|
||||
--pkggroup=admin \
|
||||
--pkglicense=LICENSE \
|
||||
--pkgsource=${LATEST_URL} \
|
||||
--maintainer=cyteen@ring-zero.co.uk \
|
||||
--requires=neomutt,isync,msmtp,pass \
|
||||
-D \
|
||||
bash ./install.sh
|
||||
EOF
|
||||
|
||||
cat > ./install.sh << 'FOE'
|
||||
|
||||
BASE_URL='https://api.github.com/repos'
|
||||
BASE_USER='LukeSmithxyz'
|
||||
BASE_REPO='mutt-wizard'
|
||||
# RELEASES_URL="${BASE_URL}/${BASE_USER}/${BASE_REPO}"/releases
|
||||
# CONTENT=$(curl -s ${RELEASES_URL}/latest)
|
||||
# LATEST_URL=$(echo "${CONTENT}" | jq --raw-output '.assets[] | select(.browser_download_url | test("Linux-x86_64")) | .browser_download_url')
|
||||
LATEST_URL=https://github.com/LukeSmithxyz/mutt-wizard
|
||||
|
||||
## Download and copy the latest version to /usr/local/bin and make executable
|
||||
git clone ${LATEST_URL} /var/tmp/mutt-wizard
|
||||
cd /var/tmp/mutt-wizard
|
||||
make install
|
||||
|
||||
## Create directories and configuration files
|
||||
# '$ mw add' and follow the prompts.
|
||||
|
||||
MUTTWIZARDCONF="/usr/local/share/mutt-wizard"
|
||||
|
|
@ -32,7 +122,7 @@ FONTS="${MUTTDIR}/fonts"
|
|||
|
||||
mkdir -p ${COLORSCHEMES}
|
||||
mkdir -p ${fonts}
|
||||
mkdir -p $ACCDIR
|
||||
mkdir -p ${ACCDIR}
|
||||
|
||||
git clone https://github.com/sheoak/neomutt-powerline-nerdfonts.git ${MUTTDIR}/powerline
|
||||
|
||||
|
|
@ -304,6 +394,7 @@ source accounts/1-cyteen42.muttrc
|
|||
source /usr/local/share/mutt-wizard/mutt-wizard.muttrc
|
||||
#source /usr/local/share/mutt-wizard/mutt-wizard-colors.muttrc
|
||||
|
||||
set editor = nvim
|
||||
set sort = threads
|
||||
set sort_aux = reverse-last-date-received
|
||||
color progress white red
|
||||
|
|
@ -336,27 +427,35 @@ EOF
|
|||
|
||||
|
||||
|
||||
mkdir -p $ACCDIR/${PROFILE_NAME}
|
||||
|
||||
cat > $ACCDIR/1-${PROFILE_NAME}.muttrc <<EOF
|
||||
# vim: filetype=neomuttrc
|
||||
# muttrc file for account ${PROFILE_NAME}
|
||||
set realname = ${REAL_NAME}
|
||||
set from = ${FROM}
|
||||
set sendmail = "/usr/bin/msmtp -a mutt"
|
||||
alias me ${REAL_NAME} <${EMAIL}>
|
||||
set folder = "/home/${USER_NAME}/.local/share/mail/mutt"
|
||||
set header_cache = /home/${USER_NAME}/.cache/mutt-wizard/
|
||||
set message_cachedir = /home/${USER_NAME}/.cache/mutt-wizard/
|
||||
set mbox_type = Maildir
|
||||
EOF
|
||||
|
||||
# auto-generated with mutt-wizard: 'mw add' and follow the instructions
|
||||
# mailboxes populated from the email account imap server so for a clean
|
||||
# account just put in the standard =Inbox =Drafts =Trash =Sent =Junk
|
||||
PROFILE_NAME=cyteen42
|
||||
EMAIL=cyteen42@yahoo.co.uk
|
||||
REAL_NAME="cyteen may"
|
||||
PROFILE_NAME=example_profile
|
||||
EMAIL=foobar@foo.bar
|
||||
REAL_NAME="foo bar"
|
||||
|
||||
mkdir -p $ACCDIR/${PROFILE_NAME}
|
||||
|
||||
cat > $ACCDIR/README <<EOF
|
||||
# To add additional mail accounts for mutt you can use mutt-wizard:
|
||||
#
|
||||
# '$ mw add'
|
||||
#
|
||||
# and follow the prompts.
|
||||
EOF
|
||||
|
||||
#cat > $ACCDIR/1-${PROFILE_NAME}.muttrc <<EOF
|
||||
## vim: filetype=neomuttrc
|
||||
## muttrc file for account ${PROFILE_NAME}
|
||||
#set realname = ${REAL_NAME}
|
||||
#set from = ${FROM}
|
||||
#set sendmail = "/usr/bin/msmtp -a mutt"
|
||||
#alias me ${REAL_NAME} <${EMAIL}>
|
||||
#set folder = "/home/${USER_NAME}/.local/share/mail/mutt"
|
||||
#set header_cache = /home/${USER_NAME}/.cache/mutt-wizard/
|
||||
#set message_cachedir = /home/${USER_NAME}/.cache/mutt-wizard/
|
||||
#set mbox_type = Maildir
|
||||
#EOF
|
||||
|
||||
mkdir -p $ACCDIR/${PROFILE_NAME}
|
||||
|
||||
|
|
@ -384,7 +483,7 @@ set spoolfile = "+Inbox"
|
|||
set record = "+Sent"
|
||||
set postponed = "+Drafts"
|
||||
set trash = "+Trash"
|
||||
mailboxes "=Bulk\ Mail" "=eBay\ -\ won" "=eBay\ -\ dispatched" "=Archives.2013" "=2600hz\ Blog" "=devuan_list" "=Drafts" "=Inbox" "=aliexpress" "=Raspberry\ Pi" "=Archives.2014" "=paypal" "=greencycle\ taken" "=tutum" "=Junk" "=dinodirect" "=Archives.2017" "=eBay\ -\ confirmed" "=greencycle\ offered" "=diyaudio" "=Trash" "=greencycle\ wanted" "=artisan" "=Draft" "=Archives.2015" "=eBay" "=Archives" "=eBay\ -\ Ending" "=Sent" "=dealextreme" "=eBay\ -\ new\ items" "=Archive" "=Drafts.2013"
|
||||
mailboxes "=Inbox =Drafts =Trash =Sent =Junk"
|
||||
macro index,pager gi "<change-folder>=Inbox<enter>" "go to inbox" # mw-autogenerated
|
||||
macro index,pager Mi ";<save-message>=Inbox<enter>" "move mail to inbox" # mw-autogenerated
|
||||
macro index,pager Ci ";<copy-message>=Inbox<enter>" "copy mail to inbox" # mw-autogenerated
|
||||
|
|
@ -405,5 +504,7 @@ macro index,pager Ma ";<save-message>=Archives.2013<enter>" "move mail to archiv
|
|||
macro index,pager Ca ";<copy-message>=Archives.2013<enter>" "copy mail to archive" # mw-autogenerated
|
||||
EOF
|
||||
|
||||
FOE
|
||||
|
||||
bash ./checkinstall_it.sh
|
||||
#mbsync ${PROFILE_NAME}
|
||||
|
|
|
|||
Loading…
Reference in New Issue