Skip to content

Commit

Permalink
Script for deploy all configurations and save it as tgz
Browse files Browse the repository at this point in the history
  • Loading branch information
meefik committed Aug 12, 2019
1 parent 9d12ceb commit 387a28d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,14 @@ Help for the parameters of the main components:
Architecture of Linux distribution, supported "armel", "armhf", "arm64", "i386" and "amd64".
--suite="stretch"
Version of Linux distribution, supported versions "wheezy", "jessie" and "stretch" (also can be used "stable", "testing" and "unstable").
Version of Linux distribution, supported versions "jessie", "stretch" and "buster" (also can be used "stable", "testing", "unstable" or "oldstable").
--source-path="http://ftp.debian.org/debian/"
Installation source, can specify address of the repository or path to the rootfs archive.
--extra-packages=""
List of optional installation packages, separated by spaces.
--method="chroot"
Containerization method "chroot" or "proot".
Expand All @@ -99,21 +102,21 @@ Help for the parameters of the main components:
--net-trigger=""
Path to a script inside the container to process changes the network.
--locale="en_US.UTF-8"
Localization, e.g. "ru_RU.UTF-8".
--locale="C"
Localization, e.g. "en_US.UTF-8".
--user-name="android"
Username that will be created in the container.
--user-password="changeme"
Password will be assigned to the specified user.
--privileged-users="root messagebus"
--privileged-users="android messagebus"
A list of users separated by a space to be added to Android groups.
```

### Links

- Source code: https://github.com/meefik/linuxdeploy-cli
- Donations: http://meefik.github.io/donate
- Donations: https://meefik.github.io/donate
25 changes: 25 additions & 0 deletions make_rootfs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

EXTERNAL_STORAGE="$1"
[ -n "${EXTERNAL_STORAGE}" ] || EXTERNAL_STORAGE="./rootfs"
[ -e "${EXTERNAL_STORAGE}" ] || mkdir -p "${EXTERNAL_STORAGE}"

CONFIG_DIR="$2"
[ -n "${CONFIG_DIR}" ] || CONFIG_DIR="./config"

find "${CONFIG_DIR}" -type f -name "*.conf" | sort | while read cfg_file
do
cfg_name="$(basename ${cfg_file%.*})"
tgz_file="${EXTERNAL_STORAGE}/${cfg_name}.tgz"
[ ! -e "${tgz_file}" ] || continue
(set -e
./cli.sh -d -p "${cfg_name}" deploy
./cli.sh -d -p "${cfg_name}" export "${tgz_file}"
./cli.sh -d -p "${cfg_name}" umount
exit 0)
if [ $? -ne 0 ]
then
echo "Exit with an error!"
exit 1
fi
done

0 comments on commit 387a28d

Please sign in to comment.