Skip to content
This repository was archived by the owner on May 9, 2021. It is now read-only.
This repository was archived by the owner on May 9, 2021. It is now read-only.

add support for additional variables - ultradefrag & sdelete #31

Open

Description

@dhekimian

I'd like to add additional support for variables similar to "update": true, specifically for ultradefrag and sdelete. Those two scripts add additional overhead and time to the builds that are not necessary during testing multiple build and only necessary when making final builds.

I'm willing to do the work and update all the .json but due to the sheer number of templates, I don't want to go through the effort if the PR isn't favored.

I'd be adding near the top of each script:
script/sdelete.bat

if NOT "%SDELETE%" == "true" exit /b

script/ultradefrag.bat

if NOT "%ULTRADEFRAG%" == "true" exit /b

Then updating all .json templates with:

"variables": {
    ...
    "update": true,
    "sdelete": true,
    "ultradefrag": true,
    ...
}

"environment_vars": [
    "CM={{user `cm`}}",
    "CM_VERSION={{user `cm_version`}}",
    "UPDATE={{user `update`}}",
    "SDELETE={{user `sdelete`}}",
    "ULTRADEFRAG={{user `ultradefrag`}}"
],

If this PR will be honored, I'll go ahead an make the changes, test and submit it.

Activity

  1. rasa commented on Jan 10, 2015

    @rasa
    Contributor

    Here's an alternative, that would keep us for having to constantly update our templates whenever new scripts are added:

    "variables": {
        ...
        "update": true,
        "boxcutter_disable": "sdelete,ultradefrag",
        "boxcutter_enable": "disabled_script1,disabled_script2",
        ...
    }
    
    "environment_vars": [
        "CM={{user `cm`}}",
        "CM_VERSION={{user `cm_version`}}",
        "UPDATE={{user `update`}}",
        "BOXCUTTER_DISABLE={{user `boxcutter_disable`}}",
        "BOXCUTTER_ENABLE={{user `boxcutter_enable`}}"
    ],
    

    Then add the following to the top of sdelete.bat:

    if defined BOXCUTTER_DISABLE (echo %BOXCUTTER_DISABLE% | findstr /I /R "\<sdelete\>" >NUL && goto :eof)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions