offline install
TRANSCRIPT
-
8/9/2019 Offline Install
1/1
#!/bin/bashday=$(date)hostname=$(hostname -s)
SUDO=`which sudo` `which kdesudo` `which gksudo` exit 316
if [ -e ./offline-update.tar ]; then
echoecho "Offline Update start from $PWD"echosleep 3
mv offline-update.tar /home/$USER/Documents/offline.tarcd /home/$USER/Documents/tar -xvf offline.tar"$SUDO" mv /etc/apt/sources.list /etc/apt/sources.list.bktouch ./temp-sources.list"$SUDO" chmod 777 ./temp-sources.listecho "deb file:///home/$USER/Documents/offline-backup ./" >> ./temp-sources.list"$SUDO" mv ./temp-sources.list /etc/apt/sources.list
"$SUDO" apt-get update"$SUDO" rm -Rf /home/$USER/Documents/offline.tarecho ""echo "Finish"echo ""echo "Do you want to install Now? y/n?"read ans
if [ "$ans" = "n" ]; thenecho "Ok Bye Bye!"fi
if [ "$ans" = "y" ]; then
"$SUDO" apt-get updateecho "Install now Ubuntu-tweak""$SUDO" apt-get install -y --force-yes ubuntu-tweak ubuntu-restricted-extras vlc compizconfig-settings-manager"$SUDO" ubuntu-tweakfi
else # ERROR LOGecho "$hostname @ $USER" > /home/$USER/Desktop/error-log.txtecho "$ker @ $day" >> /home/$USER/Desktop/error-log.txtecho "Can't find offline-update.tar" >> /home/$USER/Desktop/error-log.tx
techo "Please copy offline-install.sh and offline-update.tar" >> /home/$U
SER/Desktop/error-log.txtecho "Paste in both localtion" >> /home/$USER/Desktop/error-log.txtecho "eg. Desktop" >> /home/$USER/Desktop/error-log.txtecho " [email protected]" >> /home/$US
ER/Desktop/error-log.txtecho " http://ubuntu4mm.org" >> /home/$US
ER/Desktop/error-log.txtfi