service-gen.sh 258 B

1234567891011121314
  1. #!/usr/bin/bash
  2. DIR=$(pwd)
  3. TARGET="/usr/bin"
  4. if [ -n "$1" ]
  5. then
  6. TARGET=${1%/}
  7. fi
  8. FILE='[D-BUS Service]\nName=org.dharkael.Flameshot\nExec=##REPLACE##/flameshot'
  9. FILE=${FILE//##REPLACE##/$TARGET}
  10. echo -e $FILE > $DIR/org.dharkael.Flameshot.service