Need help in lock and unlock and after the changes

Requirement:First i need to unlock the directory which i had a script for it.If i select app1 it should unlock the directory and after chnages in the script once need to lock the directory with lock command

The below highlighed variables in lock and unlock has to be changed according choice.Please help me with the code.

/usr/local/bin/pbrun /opt/apps/8/a/scripts/perm.sh unlock TEA01 app1
echo "Select an application name you'd like to update"
echo "1 :  app1 / TEA1"
echo "2 :  app2 / TEA2"
echo "3 :  TNA1 / REA1"
echo "4 :  TNA2 / REX2"  
echo " "
echo "Enter selection:"
read choice1
echo " "

after the changing the files in the directory it should get locked again with the below command.

/usr/local/bin/pbrun /opt/apps/8/a/scripts/perm.sh lock TEA01 app1

So, based on $choice1, it seems that you want to set $opt1 and $opt2. Is that correct?

Such that,
user types in a 1
1 is stored to $choice1
therefore, programming to store "app1" to opt1 and "TEA1" to opt2
(and similar for the other three possibilities)
do some UNSPECIFIED file changes
then execute a command /usr/local/... $opt1 $opt2

I tried from end i and didn't find out a solution for solving.Could some provide some suggestions on this.