Skip to content

Commit 046d487

Browse files
committed
init ix
1 parent 823135b commit 046d487

File tree

4 files changed

+164
-5
lines changed

4 files changed

+164
-5
lines changed

Github/Runners/alpine-builder.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,4 +814,4 @@ EOS
814814
ENV GIT_ASKPASS="/bin/echo"
815815
ENV GIT_TERMINAL_PROMPT="0"
816816
#------------------------------------------------------------------------------------#
817-
#END
817+
#END
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# syntax=docker/dockerfile:1
2+
#------------------------------------------------------------------------------------#
3+
#https://hub.docker.com/r/pkgforge/alpine-ix
4+
FROM alpine:edge
5+
ENV GIT_REPO="https://github.com/pg83/ix"
6+
#ENV GIT_REPO="https://github.com/stal-ix/ix"
7+
#------------------------------------------------------------------------------------#
8+
##Setup Base
9+
RUN <<EOS
10+
set +e
11+
apk update --no-interactive 2>/dev/null
12+
apk upgrade --latest --no-interactive 2>/dev/null
13+
apk add 7zip bash binutils build-base coreutils curl fakeroot findutils file g++ gcompat git grep jq libc-dev linux-headers lld llvm moreutils parted python3 rsync sudo tar tree util-linux wget xz zstd --latest --upgrade --no-interactive
14+
hash -r 2>/dev/null || true
15+
#Checks
16+
command -v bash || exit 1
17+
command -v curl || exit 1
18+
command -v find || exit 1
19+
command -v rsync || exit 1
20+
command -v sudo || exit 1
21+
command -v tar || exit 1
22+
command -v wget || exit 1
23+
#Stats
24+
apk stats
25+
EOS
26+
#------------------------------------------------------------------------------------#
27+
##Addons
28+
RUN <<EOS
29+
set +e
30+
#askalono for Licenses
31+
wget --quiet --show-progress "https://bin.pkgforge.dev/$(uname -m)/askalono" -O "/usr/bin/askalono"
32+
chmod "a+x" "/usr/bin/askalono"
33+
#Eget for simplified releases
34+
wget --quiet --show-progress "https://bin.pkgforge.dev/$(uname -m)/eget" -O "/usr/bin/eget"
35+
chmod "a+x" "/usr/bin/eget"
36+
#Micro
37+
wget --quiet --show-progress "https://bin.pkgforge.dev/$(uname -m)/micro" -O "/usr/bin/micro"
38+
chmod "a+x" "/usr/bin/micro"
39+
#Soar
40+
wget --quiet --show-progress "https://bin.pkgforge.dev/$(uname -m)/soar" -O "/usr/bin/soar"
41+
chmod "a+x" "/usr/bin/soar"
42+
EOS
43+
#------------------------------------------------------------------------------------#
44+
##Stal/IX: https://github.com/pkgforge/devscripts/blob/main/Linux/install_ix.sh
45+
RUN <<EOS
46+
#Install
47+
cd "$(mktemp -d)" >/dev/null 2>&1
48+
curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/install_ix.sh" -o "./install.sh" && chmod +x "./install.sh"
49+
bash "./install.sh"
50+
rm -rf "$(realpath .)" && cd - >/dev/null 2>&1 || true
51+
#Check
52+
if [ -z "${SYSTMP+x}" ] || [ -z "${SYSTMP##*[[:space:]]}" ]; then
53+
SYSTMP="$(dirname "$(mktemp -u)" | tr -d '[:space:]')"
54+
fi
55+
if [ ! -d "$SYSTMP" ]; then
56+
mkdir -p "$SYSTMP"
57+
fi
58+
if [ ! -s "${SYSTMP}/INITIALIZED" ]; then
59+
exit 1
60+
fi
61+
EOS
62+
#------------------------------------------------------------------------------------#
63+
##Config
64+
RUN <<EOS
65+
#Configure ENV
66+
curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/.bashrc" -o "/etc/bash.bashrc"
67+
ln --symbolic --force "/etc/bash.bashrc" "/root/.bashrc" 2>/dev/null
68+
ln --symbolic --force "/etc/bash.bashrc" "/home/alpine/.bashrc" 2>/dev/null
69+
ln --symbolic --force "/etc/bash.bashrc" "/etc/bash/bashrc" 2>/dev/null
70+
EOS
71+
ENV GIT_ASKPASS="/bin/echo"
72+
ENV GIT_TERMINAL_PROMPT="0"
73+
#------------------------------------------------------------------------------------#
74+
#END
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# syntax=docker/dockerfile:1
2+
#------------------------------------------------------------------------------------#
3+
#https://hub.docker.com/r/pkgforge/debian-ix
4+
FROM debian:unstable
5+
ENV GIT_REPO="https://github.com/pg83/ix"
6+
#ENV GIT_REPO="https://github.com/stal-ix/ix"
7+
#------------------------------------------------------------------------------------#
8+
##Base Deps
9+
ENV DEBIAN_FRONTEND="noninteractive"
10+
RUN <<EOS
11+
#Base
12+
set +e
13+
export DEBIAN_FRONTEND="noninteractive"
14+
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
15+
packages="apt-transport-https apt-utils autopoint bash bison ca-certificates coreutils curl dos2unix fdupes file findutils gettext git gnupg2 gperf jq locales locate moreutils nano ncdu p7zip-full rename rsync software-properties-common texinfo sudo tmux unzip util-linux xz-utils wget zip"
16+
#Install
17+
apt update -y -qq
18+
for pkg in $packages; do DEBIAN_FRONTEND="noninteractive" apt install -y --ignore-missing "$pkg"; done
19+
#Install_Re
20+
for pkg in $packages; do DEBIAN_FRONTEND="noninteractive" apt install -y --ignore-missing "$pkg"; done
21+
#Install Actual Deps
22+
packages="bash binutils build-essential coreutils curl findutils file g++ git grep jq libc-dev moreutils patchelf python3 rsync sed sudo strace tar tree wget xz-utils zstd"
23+
for pkg in $packages; do DEBIAN_FRONTEND="noninteractive" apt install -y --ignore-missing "$pkg"; done
24+
hash -r 2>/dev/null || true
25+
#Checks
26+
command -v bash || exit 1
27+
command -v curl || exit 1
28+
command -v find || exit 1
29+
command -v rsync || exit 1
30+
command -v sudo || exit 1
31+
command -v tar || exit 1
32+
command -v wget || exit 1
33+
#Stats
34+
dpkg -l || true
35+
EOS
36+
#------------------------------------------------------------------------------------#
37+
##Addons
38+
RUN <<EOS
39+
set +e
40+
#askalono for Licenses
41+
wget --quiet --show-progress "https://bin.pkgforge.dev/$(uname -m)/askalono" -O "/usr/bin/askalono"
42+
chmod "a+x" "/usr/bin/askalono"
43+
#Eget for simplified releases
44+
wget --quiet --show-progress "https://bin.pkgforge.dev/$(uname -m)/eget" -O "/usr/bin/eget"
45+
chmod "a+x" "/usr/bin/eget"
46+
#Micro
47+
wget --quiet --show-progress "https://bin.pkgforge.dev/$(uname -m)/micro" -O "/usr/bin/micro"
48+
chmod "a+x" "/usr/bin/micro"
49+
#Soar
50+
wget --quiet --show-progress "https://bin.pkgforge.dev/$(uname -m)/soar" -O "/usr/bin/soar"
51+
chmod "a+x" "/usr/bin/soar"
52+
EOS
53+
#------------------------------------------------------------------------------------#
54+
##Stal/IX: https://github.com/pkgforge/devscripts/blob/main/Linux/install_ix.sh
55+
RUN <<EOS
56+
#Install
57+
cd "$(mktemp -d)" >/dev/null 2>&1
58+
curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/install_ix.sh" -o "./install.sh" && chmod +x "./install.sh"
59+
bash "./install.sh"
60+
rm -rf "$(realpath .)" && cd - >/dev/null 2>&1 || true
61+
#Check
62+
if [ -z "${SYSTMP+x}" ] || [ -z "${SYSTMP##*[[:space:]]}" ]; then
63+
SYSTMP="$(dirname "$(mktemp -u)" | tr -d '[:space:]')"
64+
fi
65+
if [ ! -d "$SYSTMP" ]; then
66+
mkdir -p "$SYSTMP"
67+
fi
68+
if [ ! -s "${SYSTMP}/INITIALIZED" ]; then
69+
exit 1
70+
fi
71+
EOS
72+
#------------------------------------------------------------------------------------#
73+
##Config
74+
RUN <<EOS
75+
#Configure ENV
76+
curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/.bashrc" -o "/etc/bash.bashrc"
77+
ln --symbolic --force "/etc/bash.bashrc" "/root/.bashrc" 2>/dev/null
78+
ln --symbolic --force "/etc/bash.bashrc" "/home/alpine/.bashrc" 2>/dev/null
79+
ln --symbolic --force "/etc/bash.bashrc" "/etc/bash/bashrc" 2>/dev/null
80+
EOS
81+
ENV GIT_ASKPASS="/bin/echo"
82+
ENV GIT_TERMINAL_PROMPT="0"
83+
#------------------------------------------------------------------------------------#
84+
#END

Linux/install_ix.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
fi
3333
if command -v apk &>/dev/null; then
3434
apk update ; apk upgrade --no-interactive 2>/dev/null
35-
apk add 7zip bash binutils build-base coreutils fakeroot findutils file g++ gcompat git grep \
35+
apk add 7zip bash binutils build-base coreutils curl fakeroot findutils file g++ gcompat git grep \
3636
jq libc-dev linux-headers lld llvm moreutils parted python3 rsync sudo tar tree util-linux xz zstd --latest --upgrade --no-interactive 2>/dev/null
3737
elif command -v apt &>/dev/null; then
3838
export DEBIAN_FRONTEND="noninteractive"
3939
apt update -y -qq ; apt upgrade -y -qq
4040
apt install bash binutils build-essential coreutils curl findutils file g++ git grep jq libc-dev \
41-
moreutils patchelf python3 rsync sed sudo strace tar tree xz-utils zstd -y -qq 2>/dev/null
41+
moreutils patchelf python3 rsync sed sudo strace tar tree wget xz-utils zstd -y -qq 2>/dev/null
4242
fi
4343
##Check
4444
yes "y" | sudo bash -c "whoami" &>/dev/null
@@ -78,7 +78,7 @@
7878
chmod 'a+x' "${HOME}/ix/ix"
7979
echo '#!/usr/bin/env bash' | sudo tee "/usr/local/bin/ix"
8080
echo -e "\nc_wd=\"\$(realpath .)\"" | sudo tee -a "/usr/local/bin/ix"
81-
echo -e "export PATH=\"\${PATH}:/ix/realm/boot/bin\"" | sudo tee -a "/usr/local/bin/ix"
81+
echo -e "export PATH=\"\${PATH}:/ix/realm/root/bin\"" | sudo tee -a "/usr/local/bin/ix"
8282
echo "cd ~/ix && \\" | sudo tee -a "/usr/local/bin/ix"
8383
echo "sudo --non-interactive \"$(realpath ${HOME}/ix/ix)\" \$@" | sudo tee -a "/usr/local/bin/ix"
8484
echo "cd \"\${c_wd}\"" | sudo tee -a "/usr/local/bin/ix"
@@ -125,7 +125,8 @@
125125
#Install a dummy pkg & Check
126126
ix run "bin/nano" -- nano --version ||\
127127
{
128-
echo -e "\n[✗] FATAL: 'ix' is probably Broken\n" ; exit 1
128+
echo -e "\n[✗] FATAL: 'ix' is probably Broken\n"
129+
exit 1
129130
}
130131
else
131132
echo -e "\n[✗] FATAL: 'ix' is NOT Installed\n"

0 commit comments

Comments
 (0)