# \#script

**URL:** https://discuss.bitrise.io/tag/script/83.md

[Latest](https://discuss.bitrise.io/latest.md) · [Categories](https://discuss.bitrise.io/categories.md) · [Tags](https://discuss.bitrise.io/tags.md)

---

## [Script mkdir cmd permission denied](https://discuss.bitrise.io/t/script-mkdir-cmd-permission-denied/22210)

<div class="topic-metadata">

**Author:** [@abdo400](https://discuss.bitrise.io/u/abdo400)\
**Replies:** 9\
**Last updated:** [February 14, 2023, 8:10pm UTC](https://discuss.bitrise.io/t/script-mkdir-cmd-permission-denied/22210 "2023-02-14T20:10:39Z")

</div>

I am trying to install a custom NDK version. I followed the steps from this post but I got a permission error: + mkdir /opt/android-ndk-tmp mkdir: /opt/android-ndk-tmp: Permission denied exit status 1 For context, I…

---

## [Detect if app in building in Bitrise in project build phase](https://discuss.bitrise.io/t/detect-if-app-in-building-in-bitrise-in-project-build-phase/21188)

<div class="topic-metadata">

**Author:** [@vladimirbakalov](https://discuss.bitrise.io/u/vladimirbakalov)\
**Replies:** 1\
**Last updated:** [September 22, 2022, 10:45pm UTC](https://discuss.bitrise.io/t/detect-if-app-in-building-in-bitrise-in-project-build-phase/21188 "2022-09-22T22:45:52Z")

</div>

I have a build phase script where I want to detect if the app is building locally or in Bitrise, and toggle the path to the Info.plist accordingly. I have tried that approach but it doesn’t seem to work. Any ideas? #!/…

---

## [Tput command not available on Bitrise script step](https://discuss.bitrise.io/t/tput-command-not-available-on-bitrise-script-step/20347)

<div class="topic-metadata">

**Author:** [@lbasios](https://discuss.bitrise.io/u/lbasios)\
**Replies:** 0\
**Last updated:** [June 10, 2022, 2:19pm UTC](https://discuss.bitrise.io/t/tput-command-not-available-on-bitrise-script-step/20347 "2022-06-10T14:19:20Z")

</div>

Hello everyone! We have a script that manages our pre-release steps (it creates our rc branch and does the required merges etc). We are trying to create a workflow on bitrise to run that pre-release script so we can hav…

---

## [Run bash script from repo](https://discuss.bitrise.io/t/run-bash-script-from-repo/4532)

<div class="topic-metadata">

**Author:** [@anselm.meyn](https://discuss.bitrise.io/u/anselm.meyn)\
**Replies:** 3\
**Last updated:** [March 16, 2022, 9:26am UTC](https://discuss.bitrise.io/t/run-bash-script-from-repo/4532 "2022-03-16T09:26:40Z")

</div>

Hi, I have a bash script in my git repo that I’d like to be able to run from my workflow. I tried adding a script step to run it with bash (after the git clone step), bash ./tools/scripts/script.sh but keep getting a …

---

## [Is it possible to share a custom script between multiple projects?](https://discuss.bitrise.io/t/is-it-possible-to-share-a-custom-script-between-multiple-projects/18590)

<div class="topic-metadata">

**Author:** [@kasper.rugaard-thoms](https://discuss.bitrise.io/u/kasper.rugaard-thoms)\
**Replies:** 1\
**Last updated:** [November 9, 2021, 10:23pm UTC](https://discuss.bitrise.io/t/is-it-possible-to-share-a-custom-script-between-multiple-projects/18590 "2021-11-09T22:23:42Z")

</div>

Hi - we have a few custom scripts that are being run on each of our projects. The custom scripts are the same for all the projects, but right now I’ve just copy-pasted the scripts around between our 4 projects, which fro…

---

## [Can't see variable exposed with envman](https://discuss.bitrise.io/t/cant-see-variable-exposed-with-envman/15538)

<div class="topic-metadata">

**Author:** [@flutterdevs](https://discuss.bitrise.io/u/flutterdevs)\
**Replies:** 1\
**Last updated:** [February 4, 2021, 7:53pm UTC](https://discuss.bitrise.io/t/cant-see-variable-exposed-with-envman/15538 "2021-02-04T19:53:29Z")

</div>

Hello, I am trying to expose a value and use it in the script which is attached to the build process of my application. I have a script that exposes the value: envman add --key MAPS\_API\_KEY\_DEV --value "$IOS\_GOOGLE\_MAP…

---

## [Ionic + iOS + OneSignal. Configure Xcode from script required](https://discuss.bitrise.io/t/ionic-ios-onesignal-configure-xcode-from-script-required/14757)

<div class="topic-metadata">

**Author:** [@sidibecker](https://discuss.bitrise.io/u/sidibecker)\
**Replies:** 1\
**Last updated:** [November 5, 2020, 11:44am UTC](https://discuss.bitrise.io/t/ionic-ios-onesignal-configure-xcode-from-script-required/14757 "2020-11-05T11:44:32Z")

</div>

Hello! We are trying to do a command line configuration for push notifications with OneSignal. See Configuration in Xcode. The configuration step requires opening xcode and adding a target “Notification Service Extensio…

---

## [How to access Workflow Environment Variables](https://discuss.bitrise.io/t/how-to-access-workflow-environment-variables/13488)

<div class="topic-metadata">

**Author:** [@Alphaopen](https://discuss.bitrise.io/u/Alphaopen)\
**Replies:** 1\
**Last updated:** [June 29, 2020, 9:52am UTC](https://discuss.bitrise.io/t/how-to-access-workflow-environment-variables/13488 "2020-06-29T09:52:39Z")

</div>

Hello! I have “targetBuild” Workflow Environment Variables Next I have a simple script #!/usr/bin/env bash set -ex envman add --key targetBuild --value "${targetBuild}" echo "Test" $targetBuild echo "Test $targetB…

---

## [Stop script step from reformatting the script contents](https://discuss.bitrise.io/t/stop-script-step-from-reformatting-the-script-contents/13121)

<div class="topic-metadata">

**Author:** [@anuerind](https://discuss.bitrise.io/u/anuerind)\
**Replies:** 7\
**Last updated:** [June 28, 2020, 1:37pm UTC](https://discuss.bitrise.io/t/stop-script-step-from-reformatting-the-script-contents/13121 "2020-06-28T13:37:15Z")

</div>

I frequently edit the workflow using the yaml file interface since it allows for faster navigation. However most of the scripts end up being reformatted from - script@1: title: Decrypt and Install the iOS provisioni…

---

## [Unable to use sed properly in the script step](https://discuss.bitrise.io/t/unable-to-use-sed-properly-in-the-script-step/13116)

<div class="topic-metadata">

**Author:** [@anuerind](https://discuss.bitrise.io/u/anuerind)\
**Replies:** 2\
**Last updated:** [June 26, 2020, 1:37am UTC](https://discuss.bitrise.io/t/unable-to-use-sed-properly-in-the-script-step/13116 "2020-06-26T01:37:47Z")

</div>

Can anybody explain the reason why my sed commands I am issuing in the script step is failing? I am trying to replace the git\_url value in a matchfile and the value being replaced has a slash. I thought this is the prob…

---

## [Failed to split BITRISE\_APK\_PATH\_LIST](https://discuss.bitrise.io/t/failed-to-split-bitrise-apk-path-list/11412)

<div class="topic-metadata">

**Author:** [@vickerleung](https://discuss.bitrise.io/u/vickerleung)\
**Replies:** 7\
**Last updated:** [February 15, 2020, 5:25pm UTC](https://discuss.bitrise.io/t/failed-to-split-bitrise-apk-path-list/11412 "2020-02-15T17:25:17Z")

</div>

Hi there. I am trying to use Bash script to rename the Android build files but failed. Any help is appreciated. # rename the apk IFS='|' read -r -a old\_apk\_path\_array \<\<\< ${BITRISE\_APK\_PATH\_LIST} mv "${old\_apk\_path\_arra…

---

## [White label app, generate N apps from the same code base](https://discuss.bitrise.io/t/white-label-app-generate-n-apps-from-the-same-code-base/9904)

<div class="topic-metadata">

**Author:** [@Hsan](https://discuss.bitrise.io/u/Hsan)\
**Replies:** 1\
**Last updated:** [August 13, 2019, 10:28am UTC](https://discuss.bitrise.io/t/white-label-app-generate-n-apps-from-the-same-code-base/9904 "2019-08-13T10:28:30Z")

</div>

I read this blog post about white label apps: https://blog.bitrise.io/whitelabel-apps-on-bitrise but I have trouble understanding how to implement a for loop on a bunch of steps, especially if the number of builds is va…

---

## [Push changes to GitHub from bash script step](https://discuss.bitrise.io/t/push-changes-to-github-from-bash-script-step/8088)

<div class="topic-metadata">

**Author:** [@DannyBravoOG](https://discuss.bitrise.io/u/DannyBravoOG)\
**Replies:** 3\
**Last updated:** [February 15, 2019, 9:04am UTC](https://discuss.bitrise.io/t/push-changes-to-github-from-bash-script-step/8088 "2019-02-15T09:04:13Z")

</div>

I’ve got a project on Bitrise that currently runs only three steps: Activate SSH Key Clone Repository Run a custom shell script In the custom script I am making some changes to the projects file structure, with the in…

---

## [How to conditionally route Slack notifications](https://discuss.bitrise.io/t/how-to-conditionally-route-slack-notifications/7647)

<div class="topic-metadata">

**Author:** [@usmonster](https://discuss.bitrise.io/u/usmonster)\
**Replies:** 3\
**Last updated:** [January 24, 2019, 4:28pm UTC](https://discuss.bitrise.io/t/how-to-conditionally-route-slack-notifications/7647 "2019-01-24T16:28:51Z")

</div>

We have lots of builds running all day long, but we don’t want to flood the same Slack channel with build results for every branch. Here’s how we avoid the noise and make sure only the appropriate channels or individuals…

---

## [How to kick off a background process?](https://discuss.bitrise.io/t/how-to-kick-off-a-background-process/7463)

<div class="topic-metadata">

**Author:** [@icma](https://discuss.bitrise.io/u/icma)\
**Replies:** 1\
**Last updated:** [December 26, 2018, 3:17pm UTC](https://discuss.bitrise.io/t/how-to-kick-off-a-background-process/7463 "2018-12-26T15:17:28Z")

</div>

Hello, We have a mock server program which we are trying to run in the background and proceed to the next step, but seems bitrise hangs on that script step expecting the server runner command to exit, which we don’t wan…

---

## [Script is never finishing](https://discuss.bitrise.io/t/script-is-never-finishing/6300)

<div class="topic-metadata">

**Author:** [@nfesquet](https://discuss.bitrise.io/u/nfesquet)\
**Replies:** 2\
**Last updated:** [September 26, 2018, 12:58pm UTC](https://discuss.bitrise.io/t/script-is-never-finishing/6300 "2018-09-26T12:58:39Z")

</div>

In one of my workflows, I need to setup a VPN connection at first, in order to access a company’s internal repository. I’m using the generic script runner step (https://github.com/bitrise-io/steps-script). All seems to w…

---

## [Running PHP script after clone](https://discuss.bitrise.io/t/running-php-script-after-clone/5934)

<div class="topic-metadata">

**Author:** [@ehuda](https://discuss.bitrise.io/u/ehuda)\
**Replies:** 5\
**Last updated:** [August 22, 2018, 12:36am UTC](https://discuss.bitrise.io/t/running-php-script-after-clone/5934 "2018-08-22T00:36:35Z")

</div>

It seems like it should be easy to run a script after Bitrise clones your repo but I can’t seem to get it to work with PHP. My file is located at /poster.php. It takes 2 command line arg. Tag and API KEY. The API\_KEY i…

---

## [Cannot read and save versionCode as env variable](https://discuss.bitrise.io/t/cannot-read-and-save-versioncode-as-env-variable/5721)

<div class="topic-metadata">

**Author:** [@vladimirpetrovski](https://discuss.bitrise.io/u/vladimirpetrovski)\
**Replies:** 4\
**Last updated:** [August 1, 2018, 2:24pm UTC](https://discuss.bitrise.io/t/cannot-read-and-save-versioncode-as-env-variable/5721 "2018-08-01T14:24:16Z")

</div>

My workflow has two main steps where: The first step is trying to read the version code from app/build.gradle file and save it as an envman variable. It is a bash script and looks like this The second one just prints t…

---

## [Inappropriate ioctl for device](https://discuss.bitrise.io/t/inappropriate-ioctl-for-device/3925)

<div class="topic-metadata">

**Author:** [@accolademobile](https://discuss.bitrise.io/u/accolademobile)\
**Replies:** 4\
**Last updated:** [February 5, 2018, 5:18pm UTC](https://discuss.bitrise.io/t/inappropriate-ioctl-for-device/3925 "2018-02-05T17:18:42Z")

</div>

I am trying to run Qark Security Scan on my apk using the Script Step. In the bash script I run a python command: python ${source\_dir}/build/qark/qark/qarkMain.py -s 1 -p ${path\_to\_apk}/${FILE\_NAME} -e 1 -d 10 -b ${ANDR…

---

## [Generate keystore](https://discuss.bitrise.io/t/generate-keystore/3827)

<div class="topic-metadata">

**Author:** [@volskyioleh](https://discuss.bitrise.io/u/volskyioleh)\
**Replies:** 4\
**Last updated:** [January 22, 2018, 2:45pm UTC](https://discuss.bitrise.io/t/generate-keystore/3827 "2018-01-22T14:45:39Z")

</div>

Hi, I want to generate a keystore for my application, but I have a problem on the ‘Deploy to Bitrise.io - Apps, Logs, Artifacts’ step. In what there can be a reason and how to solve this problem?

---

## [Cannot install appium on Android, Ubuntu stack](https://discuss.bitrise.io/t/cannot-install-appium-on-android-ubuntu-stack/2904)

<div class="topic-metadata">

**Author:** [@han.tran](https://discuss.bitrise.io/u/han.tran)\
**Replies:** 4\
**Last updated:** [October 6, 2017, 11:09am UTC](https://discuss.bitrise.io/t/cannot-install-appium-on-android-ubuntu-stack/2904 "2017-10-06T11:09:25Z")

</div>

Cannot install appium on Android, Ubuntu stack. Description of the issue Install appium with npm has errors. + npm install -g appium /usr/bin/appium -\> /usr/lib/node\_modules/appium/build/lib/main.js \> appium-chromedrive…

---

## [Docker login failed, only PR trigger](https://discuss.bitrise.io/t/docker-login-failed-only-pr-trigger/2232)

<div class="topic-metadata">

**Author:** [@sakebook](https://discuss.bitrise.io/u/sakebook)\
**Replies:** 3\
**Last updated:** [July 12, 2017, 12:53pm UTC](https://discuss.bitrise.io/t/docker-login-failed-only-pr-trigger/2232 "2017-07-12T12:53:17Z")

</div>

I use own docker image of DockerHub private registry. My docker image is private, need login. Code push and Bitrise CLI are success login docker registry, but PR requests is fail login docker registry. Error messag…

---

## [Unable to install mongodb on Ubuntu 16.04 docker image](https://discuss.bitrise.io/t/unable-to-install-mongodb-on-ubuntu-16-04-docker-image/1582)

<div class="topic-metadata">

**Author:** [@roshni\_heady](https://discuss.bitrise.io/u/roshni_heady)\
**Replies:** 3\
**Last updated:** [April 27, 2017, 4:38pm UTC](https://discuss.bitrise.io/t/unable-to-install-mongodb-on-ubuntu-16-04-docker-image/1582 "2017-04-27T16:38:45Z")

</div>

Reading package lists... Building dependency tree... Reading state information... 0 upgraded, 0 newly installed, 0 to remove and 126 not upgraded. mongod: unrecognized service /tmp/bitrise419924751/step\_src/.scriptcont: …
