Skip to content

Commit

Permalink
Add Puppy Linux support
Browse files Browse the repository at this point in the history
  • Loading branch information
islander committed Oct 15, 2019
1 parent 5bc26c6 commit 57d40f9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 5 deletions.
12 changes: 12 additions & 0 deletions base/PUPPY/before.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# before.sh for DEBIAN and TYPE=workstation
#

# Add user's .ssh directory
echo_step " Make user's .ssh"
mkdir -p "$(getent passwd "$MY_USERNAME" | cut -d: -f6)/.ssh"
if [ "$?" -ne 0 ]; then
echo_warning "Failed to create, will attempt to continue"
else
echo_success
fi
31 changes: 26 additions & 5 deletions postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,13 @@ function detect_operating_system() {
echo_step_info "Alpine Linux"
OPERATING_SYSTEM="ALPINE"
elif grep -lqs ^Mageia$ /etc/release; then
echo -e "\ntest -f /etc/release " >>"$INSTALL_LOG"
echo_step_info "Mageia"
echo -e "\ntest -f /etc/release " >>"$INSTALL_LOG"
echo_step_info "Mageia"
OPERATING_SYSTEM="MAGEIA"
elif grep -lqs Puppy /etc/os-release; then
echo -e "\ntest -f /etc/os-release " >>"$INSTALL_LOG"
echo_step_info "Puppy"
OPERATING_SYSTEM="PUPPY"
else
{
echo -e "\ntest -f /etc/debian_version"
Expand Down Expand Up @@ -551,6 +555,16 @@ function detect_installer() {
exit_with_failure "Command 'urpmi' not found"
fi
;;
PUPPY)
# https://gitlab.com/sc0ttj/Pkg
if command_exists pkg; then
echo -e "\npkg found" >>"$INSTALL_LOG"
export MY_INSTALLER="pkg"
export MY_INSTALL="-f add"
else
exit_with_failure "Command 'pkg' not found"
fi
;;
esac
echo_success
}
Expand Down Expand Up @@ -614,9 +628,16 @@ function resync_installer() {
fi
;;
pkg)
$MY_INSTALLER upgrade >>"$INSTALL_LOG" 2>&1
if [ "$?" -ne 0 ]; then
exit_with_failure "Failed to do $MY_INSTALLER upgrade"
if [ "$OPERATING_SYSTEM" = "PUPPY" ]; then
$MY_INSTALLER update-sources >>"$INSTALL_LOG" 2>&1
if [ "$?" -ne 0 ]; then
exit_with_failure "Failed to do $MY_INSTALLER repo-update"
fi
else
$MY_INSTALLER upgrade >>"$INSTALL_LOG" 2>&1
if [ "$?" -ne 0 ]; then
exit_with_failure "Failed to do $MY_INSTALLER upgrade"
fi
fi
;;
pkgman)
Expand Down

0 comments on commit 57d40f9

Please sign in to comment.