Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #259 from grm34/dev
Browse files Browse the repository at this point in the history
Allow decimals for partition sizes
  • Loading branch information
grm34 authored May 12, 2020
2 parents 7d8e738 + acc005f commit 89524eb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions STATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

File|blank|comment|code
:-------|-------:|-------:|-------:
archboot|82|121|282
src/arch/partitioning|86|90|229
archboot|82|121|284
src/arch/partitioning|86|87|230
src/arch/user|48|53|153
src/arch/base|30|39|94
src/arch/display|23|29|66
src/arch/bootloader|23|25|57
src/arch/gpu_driver|18|22|51
src/arch/mirrorlist|22|22|50
src/arch/gpu_driver|20|22|52
src/arch/mirrorlist|22|22|51
src/arch/firmware|14|13|47
src/arch/desktop|11|17|25
src/arch/mounting|9|15|13
--------|--------|--------|--------
SUM:|366|446|1067
SUM:|368|443|1072

### Config files

Expand All @@ -25,18 +25,18 @@ locale/german|13|15|130
locale/french|13|15|130
src/apps/desktop_apps|20|24|24
src/conf/xinitrc|8|8|24
src/apps/gpu_apps|12|15|17
src/apps/system_apps|12|14|17
src/apps/gpu_apps|10|13|16
src/apps/display_apps|8|10|10
--------|--------|--------|--------
SUM:|97|114|481
SUM:|99|116|482

### Markdown files

File|blank|comment|code
:-------|-------:|-------:|-------:
.github/CODE_OF_CONDUCT.md|35|0|49
README.md|25|0|47
README.md|25|0|48
STATS.md|5|0|44
.github/CONTRIBUTING.md|10|0|29
.github/PULL_REQUEST_TEMPLATE.md|9|0|20
Expand All @@ -46,4 +46,4 @@ STATS.md|5|0|44
.github/ISSUE_TEMPLATE/question.md|1|0|8
.github/ISSUE_TEMPLATE/config.yml|0|0|1
--------|--------|--------|--------
SUM:|89|0|223
SUM:|89|0|224
8 changes: 4 additions & 4 deletions archboot
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,12 @@ _install_display_manager; _enable_user_rights) 2>&1 | tee -a "${INSTALL_LOG}"
_info "${MSG_INPUTS_LOGS}"

set | grep -v \
"A=\|B=\|PASSWD\|ROOTPASSWD=\|USERPASSWD=\|RED=\|GREEN=\|YELLOW=\|BLUE=\|\
"A=\|B=\|PASSWD=\|ROOTPASSWD=\|USERPASSWD=\|RED=\|GREEN=\|YELLOW=\|BLUE=\|\
CYAN=\|BOLD=\|NC=\|ARGS=\|BASH_REMATCH=\|BYTES=\|CHAR=\|COLUMNS=\|CONFIRM=\|\
COUNT=\|INDEX=\|LENTH=\|LINES=\|NUMBER=\|ORDER=\|PART=\|MSG_\|PIPESTATUS=\|\
PARTITION_SIZE=\|PART_NAME=\|_CHOICE=\|BASE_SOURCES=|DE_SOURCES=\|OPTION=\|\
OPT\|OPTIONAL=\|CHECK_COUNTRY_CODE=\|CHECK_IP=\|CHECK_MIRRORS=\|TOKEN=\|\
SIZES_EQ" > new_vars.log
PARTITION_SIZE=\|PART_NAME=\|_CHOICE=\|BASE_SOURCES=\|DE_SOURCES=\|OPTION=\|\
OPT=\|OPTIONAL=\|CHECK_COUNTRY_CODE=\|CHECK_IP=\|CHECK_MIRRORS=\|TOKEN=\|\
SIZES_EQ=\|CPU_LIST=\|PARTITION=" > new_vars.log

diff old_vars.log new_vars.log | grep "^>" >> "${INPUTS_LOG}"
sed -i "$ d" "${INPUTS_LOG}"
Expand Down
10 changes: 5 additions & 5 deletions src/arch/partitioning
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ _default_partitioning_scheme() {
for PART in "${PARTITION[@]}"; do
PART_NAME=${PART/_PARTITION/}

## Set partition sizes example
if [[ ${PART} == "SWAP_PARTITION" ]]; then SIZES_EQ+=(4G)
elif [[ ${PART} == "HOME_PARTITION" ]]; then SIZES_EQ+=(100G); fi
if [[ ${PART} == "SWAP_PARTITION" ]]; then
SIZES_EQ+=(4G)

## Free space for home ? (auto if MBR type with 4 partitions)
if [[ ${PART} == "HOME_PARTITION" ]]; then
elif [[ ${PART} == "HOME_PARTITION" ]]; then
SIZES_EQ+=(100G)

if [[ ${FIRMWARE} == "BIOS" && ${#PARTITION[@]} == "4" ]]; then
PARTITION_SIZE="freespace"
Expand All @@ -161,7 +161,7 @@ _default_partitioning_scheme() {

# Check if valid size (otherwise ask again)
until [[ ${PARTITION_SIZE} =~ \
^[1-9]{1}[[0-9]{0,2}(M|G|T){1}$ ]]; do
^[1-9]{1}[0-9]{0,2}(,[0-9]{1,3}){0,1}(M|G|T){1}$ ]]; do

_note "${MSG_PART_SIZE} {M,G,T} (e.g., ${SIZES_EQ[${INDEX}]})"
_prompt "${MSG_PROMPT_VALID_PART_SIZE} ${PART_NAME}:"
Expand Down

0 comments on commit 89524eb

Please sign in to comment.