Skip to content

Commit

Permalink
Code & Features Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nathaneltitane committed Dec 6, 2024
1 parent e7b0528 commit c670a30
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions container-session
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ do
echo
echo -e "-u, --username Specify user name for session login."
echo
echo -e "-d, --directory Specify root filesystem directory as /path/to/root/name/version"
echo -e "-d, --directory Specify container base directory as /path/to/base/directory containing /distribution/version"
echo
echo -e "-h, --help Show help and usage information."
echo
Expand Down Expand Up @@ -185,15 +185,15 @@ container_parse () {

# parse container directories

for distribution in "${PREFIX}"/cnt/*
for distribution in "${container_base}"/*
do
for version in "${distribution}"/*
do
distribution_name=$(basename $distribution)
distribution_name=$(basename ${distribution})

distribution_version=$(basename $version)
distribution_version=$(basename ${version})

containers+=($distribution_name $distribution_version)
containers+=(${distribution_name} ${distribution_version})
done
done

Expand Down Expand Up @@ -307,7 +307,8 @@ container_input () {

if [ -z "${container_directory}" ]
then
CONTAINER_ROOT=("${PREFIX}"/cnt/*/*)
CONTAINER_BASE="${PREFIX}"/cnt
CONTAINER_ROOT=("${CONTAINER_BASE}"/*/*)

container_directory=("${CONTAINER_ROOT}")

Expand All @@ -324,7 +325,8 @@ container_input () {

if [ ! -e "${container_directory}" ]
then
CONTAINER_ROOT=("${PREFIX}"/cnt/*/*)
CONTAINER_BASE="${PREFIX}"/cnt
CONTAINER_ROOT=("${CONTAINER_BASE}"/*/*)

frobulator.err "Container directory not found."
echo
Expand All @@ -339,7 +341,8 @@ container_input () {

if [ -d "${container_directory}" ]
then
CONTAINER_ROOT=("${container_directory}")
CONTAINER_BASE="${container_directory}"
CONTAINER_ROOT=("${CONTAINER_BASE}"/*/*)

frobulator.scs "Container directory found."
echo
Expand Down

0 comments on commit c670a30

Please sign in to comment.