-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring testing script to make it work similarily to the building
script. Also adding loop on all architectures and testing summary output at the end. Removed erroneous doc in README.
- Loading branch information
Showing
6 changed files
with
156 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
# This script will try to install the package given as argument | ||
|
||
# Defaults | ||
# Repository to get source from | ||
REPO_LOC='/mnt/build/' | ||
|
||
# Check argument | ||
if [ $# -gt 0 ]; then | ||
PKG=$1 | ||
else | ||
echo "What package do you want me to try to install?" | ||
exit 1 | ||
fi | ||
|
||
# Setup the local repository and update APT | ||
/usr/local/bin/ps-local-repo ${REPO_LOC}/build_results/ | ||
|
||
# Install the package | ||
apt-get -y install $PKG | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script configures a local APT repository to use locally built packages | ||
# It can be given an argument, the absolut path to the directory where the repository exists | ||
# It needs to be given an argument, the absolut path to the directory where the repository exists | ||
|
||
LOCAL_REPO=$1 | ||
if [ $# -gt 0 ]; then | ||
LOCAL_REPO=$1 | ||
else | ||
echo "Where is the local repository located?" | ||
exit 1 | ||
fi | ||
|
||
# The script can be run as root or as a user with sudo access | ||
# We might not know if sudo is actually insalled or not | ||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then | ||
SUDO="sudo" | ||
else | ||
SUDO="" | ||
fi | ||
echo "To solve dependencies, I will also use packages from ${LOCAL_REPO} if any." | ||
echo "# Locally built packages" | sudo tee /etc/apt/sources.list.d/localy-built-packages.list | ||
echo "deb [trusted=yes] file:${LOCAL_REPO} ./" | sudo tee -a /etc/apt/sources.list.d/localy-built-packages.list | ||
sudo apt update | ||
echo "# Using locally built packages" | $SUDO tee /etc/apt/sources.list.d/localy-built-packages.list > /dev/null | ||
echo "deb [trusted=yes] file:${LOCAL_REPO} ./" | $SUDO tee -a /etc/apt/sources.list.d/localy-built-packages.list > /dev/null | ||
$SUDO apt update | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters