Skip to content

Commit

Permalink
whatsnew for xenial, plus intsall + verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Levy committed Mar 31, 2018
1 parent 1941220 commit 22f73d2
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions whatsnew
Expand Up @@ -2,17 +2,35 @@

VNAME=$( cat /etc/*release | grep CODENAME | cut -f2 -d'=' | uniq )
VER=$( cat /etc/*release | grep RELEASE | cut -f2 -d'=' | uniq )
pname=$0

echo $pname $VNAME $VER

usage="$0 [ -v ]"

# an install routine to create the directories and self discover

# possible an install switch with root=filesystem sub switch and then create
# the ../bin and ../var/what's new directory, maybe an etc to hold the WORKDIR
# variable, maybe the locate program could be used to determine the root.

# the workdir will be made, this is best run as root

# this program requires curl, I could use apt-cache policy to make the check,
# but I chose to use 'which'.

# whoami, if not root, shell = sudo

VERROR=0

if [ -z $1 ];then
verbose=false
elif [ $1 == '-v' ];then
verbose=true
else
verbose=false
fi

#apt-cache policy curl should be usable to make check

if [ $( which curl | wc -l ) -eq 0 ];then
Expand All @@ -23,15 +41,24 @@ fi
ROOTDIR=/opt/local
WORKDIR=${ROOTDIR}/var/whatsnew

mkwd()
{
sudo mkdir -p $1
chmod -R 777 ${ROOTDIR}
}

if [ ! -d ${WORKDIR} ];then
echo There is no ${WORKDIR} on this system, please make it
echo There is no ${WORKDIR} on this system, I\'ll make you one.
# we could make it ourself
mkwd ${WORKDIR}
VERROR=1
fi

if [ ${VERROR} -eq 1 ];then
exit ${VERROR}
fi


remotemanifestname=ubuntu-${VER}-desktop-amd64.manifest
fullremotename=http://releases.ubuntu.com/${VNAME}/${remotemanifestname}

Expand Down Expand Up @@ -65,6 +92,10 @@ comm -23 ${foundpkgs} ${oninstall} > ${afterthought}
lines=$( wc -l ${afterthought} | awk '{ print $1 }')
echo There are $lines lines in the "afterthoughts" file

if [ $verbose == true ];then
cat ${afterthought}
else
echo The afterthoughts file is called ${afterthought}
fi


cat /etc/*release | grep CODENAME | cut -f2 -d'=' | uniq
# cat /etc/*release | grep CODENAME | cut -f2 -d'=' | uniq

0 comments on commit 22f73d2

Please sign in to comment.