jan/.github/scripts/rename-uninstaller.sh
hiento09 1ad897782c
feat: new nightly app channel (#3948)
Co-authored-by: Hien To <tominhhien97@gmail.com>
2024-11-05 19:40:19 +07:00

24 lines
475 B
Bash

#!/bin/bash
# File path to be modified
FILE_PATH="electron/scripts/uninstaller.nsh"
# Check if the correct number of arguments is provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <channel>"
exit 1
fi
CHANNEL="$1"
# Check if the file exists
if [ ! -f "$FILE_PATH" ]; then
echo "File does not exist: $FILE_PATH"
exit 1
fi
# Perform the replacements
sed -i -e "s#jan#jan-$CHANNEL#g" "$FILE_PATH"
# Notify completion
echo "File has been updated: $FILE_PATH"