Bash script to create an windows cmd file for downloading on windows. The script needs zip and curl to be installed on windows. On an up to date windows should have it installed as default.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Steffen Pohle 98ef33ea8e
Update 'Readme.md'
4 years ago
Readme.md Update 'Readme.md' 4 years ago
apt-offline2bat.sh first commit 4 years ago

Readme.md

apt-offline2bat.sh

This script is used to creat an batch script for downloading all needed files and packages needed by apt-offline. The created batch script will need curl and zip to be installed on windows.

As curl is mandatory for the script, zip is not. It is possible to edit the created batch script and delete the last four lines of the script. You can compress the files with the application of your choice.

zip ..\bundle.zip *
cd ..
del bundle\*.* /Q
rmdir bundle

Usage of apt-offline

Apt-Offline is an offline download helper to updateing debian based linux distributions. It should be possible to install apt-offline via apt install apt-offline.

Update packages database

The following two commands will create at first the apt-offline.sig file and at second the apt-offline.bat file to be run on the windows mashine.

apt-offline set --update apt-offline.sig
apt-offline2bat.sh apt-offline.sig apt-offline.bat

After the bundle.zip file is created and copied to the offline linux system, you can install the files.

apt-offline install bundle.zip

Update the system

We create again the apt-offline.sig file and apt-offline.cmd file to download the needed data. If only an upgrade is needed, change the upgrade-type to upgrade.

apt-offline set --upgrade --upgrade-type=dist-upgrade apt-offline.sig
apt-offline2bat.sh apt-offline.sig apt-offline.bat

Run the batch script and copy the bundle.zip file to the offline system. After this is done install the bundle.zip file and upgrade the system.

apt-offline install bundle.zip
apt dist-upgrade

Install packages

Run the commands.

apt-offline set --install-packages PACKAGE1 PACKAGE2 ... --update apt-offline.sig
apt-offline2bat.sh apt-offline.sig apt-offline.bat

Run the script, copy the bundle.zip file to the offline system. And install everything with the folloging commands.

apt-offline install bundle.zip
apt install PACKAGE1 PACKACGE2 ...