I am new to RPM Package enhancement/development and working on post-install script.
I want to achieve the symbolic links creation on execution of post-install script but stuck on a issue.
The script execution is working fine for symbolic link creation but for Upgrade part when I check the Symbolic links in "$RPM_pckg_home/bin" they not getting created though the commands are executed successfully.
Here is the sample code;
Original_bin_path=/a/b/c
RPM_pckg_home=/d/e/f
if [[ "$1" -eq 1 ]]; then # 1 for install
cd $RPM_pckg_home/bin
for cmd in `ls Original_bin_path` ; do
ln -s $Original_bin_path/${cmd} ${cmd}
done
elif [[ "$1" -eq 2 ]]; then # 2 for Upgrade
cd $RPM_pckg_home/bin
for cmd in `ls Original_bin_path` ; do
rm ${cmd}
ln -s $Original_bin_path/${cmd} ${cmd}
done
fi
Could you please suggest where would be the issue.